diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-16 23:12:15 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-16 23:12:15 -0500 |
commit | 88f8fc825babd241d13f2e949e8bda07a8085248 (patch) | |
tree | 80d4eb2bdb4576bcc702b6f46290506b41505c24 | |
parent | 9856fc48b5a3cc949eda67f10abd4d1ad302ec00 (diff) | |
download | gpsd-88f8fc825babd241d13f2e949e8bda07a8085248.tar.gz |
gpsdecode can now dump NMEA and GPS binary data presented on standard input.
All regression tests pass.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | gpsdecode.c | 2 | ||||
-rw-r--r-- | gpsdecode.xml | 12 |
3 files changed, 12 insertions, 5 deletions
@@ -11,7 +11,8 @@ API cleanup is finished; set_raw_hook is gone. JSON timestamps in TPV and SKY are now ISO8601 rather than seconds since the Unix epoch. GPGST sentences are now parsed for noise statistics when a device emits them. AIS and - RTCM2 JSON dumps have device fields. + RTCM2 JSON dumps have device fields. gpsdecode can now dump NMEA + and GPS binary data to JSON. * Tue Jul 13 2010 Eric S. Raymond <esr@snark.thyrsus.com> - 2.95 The autonomous robot submarine total world domination release! diff --git a/gpsdecode.c b/gpsdecode.c index 3058e9dd..922287ed 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -380,7 +380,7 @@ static void decode(FILE * fpin, FILE * fpout) if (changed == ERROR_IS || changed == NODATA_IS) break; - else if ((changed & REPORT_IS) != 0) + else if ((changed & (REPORT_IS|AIS_IS|RTCM2_IS|RTCM3_IS)) == 0) continue; /* * We really ought to get rid of the non-JSON cases someday. diff --git a/gpsdecode.xml b/gpsdecode.xml index 4ca21763..becf6acf 100644 --- a/gpsdecode.xml +++ b/gpsdecode.xml @@ -16,7 +16,7 @@ BSD terms apply: see the file COPYING in the distribution root for details. </refmeta> <refnamediv id='name'> <refname>gpsdecode</refname> -<refpurpose>decode RTCM or AIVDM streams into a readable format</refpurpose> +<refpurpose>decode GPS, RTCM or AIVDM streams into a readable format</refpurpose> </refnamediv> <refsynopsisdiv id='synopsis'> @@ -34,7 +34,7 @@ BSD terms apply: see the file COPYING in the distribution root for details. <refsect1 id='description'><title>DESCRIPTION</title> -<para>This tool is a decoder/encoder for various binary packet formats +<para>This tool is a decoder/encoder for NMEA and various binary packet formats associated with GPS and differential-correction services. It produces a text dump on standard output from binary on standard input, or binary packets on standard output from text on standard input, and @@ -42,6 +42,11 @@ aims to be 100% information-preserving in both directions. As well as data, the decoder also prints decoder status messages to standard error as necessary.</para> +<para>NMEA and GPS binary formats can be decoded to JSON (the same +format used by +<citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>) +but not encoded.</para> + <para>Two of the supported formats are RTCM 2 and 3, a pair of obscure and complicated serial protocol used for broadcasting pseudorange corrections from differential-GPS reference stations. You can use this @@ -50,7 +55,8 @@ mode of the tool with to examine RTCM feeds from DGPSIP servers or Ntrip broadcasters. The decoder dump formats for RTCM2 are described in <citerefentry><refentrytitle>rtcm</refentrytitle><manvolnum>5</manvolnum></citerefentry>; -these lines go to standard output.</para> +these lines go to standard output. RTCM2 can be decoded and encoded; RTCM3 +can only be decoded, and support is presently incomplete.</para> <para>Another supported format is AIVDM. This is the sentence format used by the marine Automatic Identification System. This can be |