gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] TOFF and PPS values from gpspipe


From: Gary E. Miller
Subject: Re: [gpsd-users] TOFF and PPS values from gpspipe
Date: Wed, 28 Aug 2019 16:51:32 -0700

Yo Kaya!

On Wed, 28 Aug 2019 21:35:46 +0100
Kaya Saman <address@hidden> wrote:

> >> I'm writing a script in order to be able to display certain
> >> information from GPSd on a 20x2 line character LCD display.  
> > Did you look at lcdgps.c in the gpsd source?  That is exactly what
> > it already does.  
> 
> 
> Yep I did. The only issue is that it requires LCDproc of which there 
> isn't a driver for my Newhaven display :-( <- my idea was to write a 
> driver for it but have no experience there so it's basically another 
> story lol

At least that gives you a starting point.  When you get someething
running we would appreciate a copy we can share with the next person.

> for TOFF it's basically the difference between the clock_sec and 
> real_sec values with the PPS offset being the real_nsec and
> clock_nsec values??

Yup.  But that is usualy left to ntpd to deal with.

> So if it's simply the difference between time values using the 
> information output by my system:
> TOFF: 0.678304699
> PPS: 0.000018192

And TOFF is the time from the receiver serial stream.  PPS is the
PPS.  You PPS at 18 micro secindss could be better...

> In the PPS class output from gpspipe -wpP I get these values:
> real_sec=1567023609 real_nsec=0
> clock_sec=15670223609 clock_nsec=25649 precision=-20

Simple PPS is 25.659 micro seconds off.

> At this stage now I am totally lost :-( Am I even looking at the
> right values needed to get the TOFF and PPS in the first place?

Probably, just look at what gpsmon and cgps do.  Cross checking against
the doc.

> As my script is being written in Bash my idea was to simply use 
> 'gpspipe' then using string manipulation do the numerical processing 
> after obtaining the values needed.

Ouch.  Python would be easier and better.

> If we look at the difference between the clock and real_sec values:
> 15670223609 - 1567023609 = 14103200000 seconds

Looks like an extra 2 in there.  As I write this, the time is now
1567036214.  Assuming that NTP has your system clock set correctly.
Look at ntpmon to confirm that.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpkn7ICzYxHK.pgp
Description: OpenPGP digital signature


reply via email to

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