'\" t .\" Title: gpsdecode .\" Author: Eric S. Raymond .\" Generator: Asciidoctor 2.0.20 .\" Date: 2023-01-10 .\" Manual: GPSD Documentation .\" Source: GPSD, Version 3.25 .\" Language: English .\" .TH "GPSDECODE" "1" "2023-01-10" "GPSD, Version 3.25" "GPSD Documentation" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" gpsdecode \- decode GPS, RTCM or AIS streams into a readable format .SH "SYNOPSIS" .sp \fBgpsdecode\fP [OPTIONS] .sp \fBgpsdecode\fP \-h .sp \fBgpsdecode\fP \-V .SH "DESCRIPTION" .sp \fBgpsdecode\fP tool is a batch\-mode decoder for NMEA and various binary packet formats associated with GPS, AIS, and differential\-correction services. It produces a JSON dump on standard output from binary on standard input. The JSON is the same format documented by \fBgpsd\fP; this tool uses the same decoding logic as \fBgpsd\fP, but with a simpler interface intended for batch processing of data files. .sp All sensor\-input formats known to the GPSD project can be decoded by this tool. These include: NMEA, AIVDM (the NMEA\-derived sentence format used by AIS, the marine Automatic Identification System), RTCM2, and all supported GPS binary formats (notably including SiRF). See \fBgpsd\fP(8) for applicable standards and known limitations of the decoding logic. .sp You can use this tool with \fBnc\fP(1) to examine AIS feeds from AIS pooling services, RTCM feeds from RTCM receivers or NTRIP broadcasters. .SH "OPTIONS" .sp \fB\-?\fP, \fB\-h\fP, \fB\-\-help\fP .RS 4 Output a usage mssage, then exit. .RE .sp \fB\-c\fP, \fB\-\-json\fP .RS 4 Sets the AIS dump format to separate fields with an ASCII pipe symbol. Fields are dumped in the order they occur in the AIS packet. Numerics are not scaled (\fB\-u\fP is forced). Strings are unpacked from six\-bit to full ASCII .RE .sp \fB\-d\fP, \fB\-\-decode\fP .RS 4 Decode packets presented on standard input to standard output. This is the default behavior. .RE .sp \fB\-D LVL\fP, \fB\-\-debug LVL\fP .RS 4 Set the debug verbosity level to LVL. It is mainly of interest to for troubleshooting. .RE .sp \fB\-e\fP, \fB\-\-encode\fP .RS 4 Encode JSON on standard input to JSON on standard output. This option is only useful for regression\-testing of the JSON dumping and parsing code. .RE .sp \fB\-j\fP, \fB\-\-json\fP .RS 4 Sets the output dump format to JSON (the default behavior). .RE .sp \fB\-m\fP, \fB\-\-minlength\fP .RS 4 Dump minimum lengths for each packet type in the input (ignoring comment packets). This is probably of interest only to GSD developers. .RE .sp \fB\-n\fP, \fB\-\-nmea\fP .RS 4 Dump the generated pseudo\-NME0183. .RE .sp \fB\-s\fP, \fB\-\-split24\fP .RS 4 Report AIS Type 24 sentence halves separately rather than attempting to aggregate them. .RE .sp \fB\-t TYPES\fP, \fB\-\-types TYPES\fP .RS 4 A comma\-separated list of numeric types. Packets with a numeric AIS, RTCM2, or RTCM3 type are passed through and output only if they match a type in the list. Packets of other kinds (in particular GPS packets) are passed through unconditionally. .RE .sp \fB\-u\fP, \fB\-\-unsscaled\fP .RS 4 Suppress scaling of AIS data to float quantities and text expansion of numeric codes. A dump with this option is lossless. .RE .sp \fB\-v\fP, \fB\-\-verbose\fP .RS 4 Dump textual packets to output as they are received on input, immediately preceding corresponding output. .RE .sp \fB\-V\fP, \fB\-\-version\fP .RS 4 Print version number, then exit. .RE .SH "AIS DSV FORMAT" .sp With the \fB\-c\fP or \fB\-\-ais\fP option, dump lines are values of AIS payload fields, pipe\-separated, in the order that they occur in the payload. Spans of fields expressing a date are emitted as an ISO8601 timestamp (look for colons and the trailing Z indicating Zulu/UTC time), and the 19\-bit group of TDMA status fields found at the end of message types 1\-4 are are dumped as a single unsigned integer (in hex preceded by "0x"). Unused regional\-authority fields are also dumped (in hex preceded by "0x"). Variable\-length binary fields are dumped as an integer bit length, followed by a colon, followed by a hex dump. .SH "RETURN VALUES" .sp \fB0\fP .RS 4 on success. .RE .sp \fB1\fP .RS 4 if the action was unknown or the write to the control socket failed, .RE .SH "SEE ALSO" .sp \fBgpsd\fP(8), \fBgps\fP(1) .SH "RESOURCES" .sp \fBProject web site:\fP \c .URL "https://gpsd.io/" "" "" .SH "COPYING" .sp This file is Copyright 2013 by the GPSD project .br SPDX\-License\-Identifier: BSD\-2\-clause .SH "AUTHOR" .sp Eric S. Raymond