GPSDECODE(1)

πŸ’– GPSDECODE β€” the manual page but make it a group chat πŸ’–

okay so bestie, welcome to gpsdecode from the GPSD docs. yes it's a manpage, yes I made it cute, no I did not drop a single fact. let's go ✨


🌸 NAME 🌸

gpsdecode β€” decode GPS, RTCM or AIS streams into a readable format πŸ›°οΈ


πŸŽ€ SYNOPSIS πŸŽ€

gpsdecode [OPTIONS]

gpsdecode -h

gpsdecode -V

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, gpsdecode is a batch-mode decoder for NMEA and all the various binary packet formats that hang out with GPS, AIS, and differential-correction services. It takes binary on standard input and produces a JSON dump on standard output. And the JSON? It's literally the exact same format documented by gpsd β€” same decoding logic, no cap β€” except this tool has a simpler interface built for batch processing of data files. it's giving "gpsd but low-key".

Every sensor-input format the GPSD project knows about can be decoded by this thing. The roster:

  • NMEA
  • AIVDM β€” that's the NMEA-derived sentence format used by AIS, the marine Automatic Identification System, bestie
  • RTCM2
  • and all supported GPS binary formats, notably including SiRF πŸ‘‘
Head over to gpsd(8) for the applicable standards and the known limitations of the decoding logic. iykyk.

Also, you can totally use this tool with nc(1) to snoop on AIS feeds from AIS pooling services, or RTCM feeds from RTCM receivers or NTRIP broadcasters. main character energy fr fr 🫢


✨ OPTIONS ✨

  • -?, -h, --help β€” prints a usage message, then dips out. bye πŸ’…
  • -c, --json β€” sets the AIS dump format so fields get separated by an ASCII pipe symbol. Fields come out in the order they occur in the AIS packet. Numerics are not scaled (-u gets forced on, periodt). Strings get unpacked from six-bit to full ASCII.
  • -d, --decode β€” decode packets coming in on standard input, send them to standard output. This is the default behavior, so it's the chill one.
  • -D LVL, --debug LVL β€” sets the debug verbosity level to LVL. mostly for troubleshooting, ngl.
  • -e, --encode β€” encode JSON on standard input to JSON on standard output. This one is only useful for regression-testing the JSON dumping and parsing code. niche but valid.
  • -j, --json β€” sets the output dump format to JSON. this is the default behavior btw, so she's already the moment.
  • -m, --minlength β€” dumps minimum lengths for each packet type in the input (ignoring comment packets). probably only interesting to GSD developers, not gonna lie.
  • -n, --nmea β€” dumps the generated pseudo-NME0183.
  • -s, --split24 β€” reports AIS Type 24 sentence halves separately instead of trying to aggregate them. choose chaos 🫢
  • -t TYPES, --types TYPES β€” a comma-separated list of numeric types. Packets with a numeric AIS, RTCM2, or RTCM3 type get 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. no filter, no problem.
  • -u, --unsscaled β€” suppresses scaling of AIS data to float quantities, and suppresses text expansion of numeric codes. a dump with this option is lossless ✨
  • -v, --verbose β€” dumps textual packets to output as they're received on input, immediately preceding the corresponding output. so you see everything as it happens πŸ’€
  • -V, --version β€” prints the version number, then exits.

🌈 AIS DSV FORMAT 🌈

With the -c or --ais option, dump lines are values of AIS payload fields, pipe-separated, in the order that they occur in the payload.

Spans of fields that express a date get emitted as an ISO8601 timestamp β€” look for colons and the trailing Z that means Zulu/UTC time, bestie, that Z is doing a lot of work.

The 19-bit group of TDMA status fields found at the end of message types 1-4 gets dumped as a single unsigned integer (in hex, preceded by "0x").

Unused regional-authority fields also get dumped (in hex, preceded by "0x").

Variable-length binary fields get dumped as an integer bit length, followed by a colon, followed by a hex dump. cute little sandwich πŸ₯ͺ


πŸ’œ RETURN VALUES πŸ’œ

  • 0 β€” on success πŸŽ‰
  • 1 β€” if the action was unknown or the write to the control socket failed 😭

πŸ”₯ SEE ALSO πŸ”₯

gpsd(8), gps(1)


⭐ RESOURCES ⭐

Project web site: https://gpsd.io/


πŸ‘‘ COPYING πŸ‘‘

This file is Copyright 2013 by the GPSD project SPDX-License-Identifier: BSD-2-clause


πŸŽ€ AUTHOR πŸŽ€

Eric S. Raymond


okay that's the whole thing bestie, go decode something slay πŸ’…βœ¨

This was the GPSD, Version 3.27.5 manual page, dated 2025-11-04 β€” gpsdecode(1), out πŸ¦‹πŸ’–