[time-nuts] GPS for Nixie Clock
Gary E. Miller
gem at rellim.com
Wed Jul 13 21:01:47 UTC 2016
Yo Mark!
On Wed, 13 Jul 2016 19:17:54 +0000
Mark Sims <holrum at hotmail.com> 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
gem at rellim.com Tel:+1 541 382 8588
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20160713/66249f04/attachment.sig>
More information about the Time-nuts_lists.febo.com
mailing list