Yo Mark!

On Wed, 13 Jul 2016 19:17:54 +0000
Mark Sims <[email protected]> wrote:

> Most
> receivers with binary messages take around 1000 lines,  but they
> usually support more features.

gpsd GPS drivers in C run from 432 to 1843 LOC.  And likely a number of
features are missing, but few that anyone misses.

> Parsing the GPSD JSON formatted
> messages is quite a bit more complex than NMEA if you want to do it
> "properly".

If you grab the gpsd JSON feed, and you have a decnet JSON parsing 
library then the parser should be short.

The cgps client does it in 847 lines including curses ouput, and parses
a lot of odd stuff.

That said, the NTPsec driver in C for gpsd JSON is almost 2200 lines.
But that is not a shining example of code...

You only need to write one parser for gpsd JSON.  If you try to do NMEA
directly you will find a ton of variants.  Likely all you would need is to 
connect and then parse the PPS sentence (TOFF):  That looks like this:

{"class":"TOFF","device":"GPS0","real_sec":1428001514, 
"real_nsec":1000000,"clock_sec":1428001513,"clock_nsec":999999999}

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        [email protected]  Tel:+1 541 382 8588

Attachment: pgp9zI9uqQo1A.pgp
Description: OpenPGP digital signature

_______________________________________________
time-nuts mailing list -- [email protected]
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Reply via email to