gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] ✘$GPGST busted time


From: Eric S. Raymond
Subject: Re: [gpsd-dev] ✘$GPGST busted time
Date: Tue, 29 Mar 2016 08:52:25 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Gary E. Miller <address@hidden>:
> I'm not that familiar with the JSON encoder, but I see a bug in it.
> 
> Hos is it that this GPGST:
> 
> $GPGST,232713.000,1.3,105.1,9.1,-40.9,0.3,0.3,0.6*78
> 
> yields this JSON:
> 
> {"class":"GST","time":"1970-01-03T16:38:33.000Z","rms":1.300,"major":105.100,"minor":9.100,"orient":-40.900,"lat":0.300,"lon":0.300,"alt":0.600}
> 
> 
> How did the time in the GST get the wrong year?  Other sentences, with
> the same second, work fine.
> 
> For example, the adjacent TPV has the right time:
> 
> $GPRMC,232713.000,A,4404.1237969,N,12118.8472448,W,000.0,159.2,280316,,,D*71
> 
> {"class":"TPV","mode":3,"time":"2016-03-28T23:27:13.000Z","ept":0.005,"lat":44.068729948,"lon":-121.314120747,"alt":1132.560,"epv":36.800,"track":159.2000,"speed":0.000,"climb":0.000,"epc":184.00}
> 
> Samples in test/daemon/skytraq-fix.log.chk,
> test/daemon/polarx2.log.chk, test/daemon/ublox-lea-5q.log.chk, etc.
> 
> Anyone got an idea?

Bug fixed.  The JSON dump function for GST was missing the guard that should
have stopped it from emitting a timestamp field if no valid fix had been
seen yet.

Not as bad as it sounds - you'd normally trip over this case only in the
first two seconds of operation, before the cycle detector figures out the
sentence sequence in the NMEA burst.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]