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 11:19:05 -0700

Yo Kaya!

On Tue, 27 Aug 2019 21:28:49 +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.

> Basically what I want to figure out is how gpsmon arrives at the TOFF 
> and PPS values in the GSA + PPS window. Is there a formula for it?

Read the gpsd_json man page for details.

> Taking the example from the docs:
> 
> https://gpsd.gitlab.io/gpsd/gpsd_json.html
> 
> {"class":"PPS","device":"/dev/ttyUSB0",
>       "real_sec":1330212592, "real_nsec":343182,
>       "clock_sec":1330212592,"clock_nsec":343184,
>       "precision":-3}
> 
> while in gpsmon it shows the PPS as -0.00000xxxx <- where 'xxxx'
> changes on each pulse.

Yes, it is just the difference between when we think the PPS was sent
and the system clock at that moment.


> I've also had a look at the gpsmon.c file: 
> https://github.com/mutability/gpsd/blob/master/gpsmon.c
> but couldn't find anything....

The code is in toff_update() in gpsmon.c

        TS_SUB(&timedelta, &time_offset.clock, &time_offset.real);

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: pgp4C1XiOeMub.pgp
Description: OpenPGP digital signature


reply via email to

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