[Top][All Lists]

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

Re: [gpsd-users] About date and time validity

From: Gary E. Miller
Subject: Re: [gpsd-users] About date and time validity
Date: Tue, 11 Dec 2018 12:03:22 -0800

Yo Massimiliano!

On Tue, 11 Dec 2018 08:29:17 +0100
Massimiliano Fago <address@hidden> wrote:

> I have implemented my system by following this guide:

Looks like a good start.  I sure hope you did not build off of 3.16.
Latest is 3.18.1, and there are important fixes in git head.

I also disagree with that howto using systemd.  As you can see from that
howto, the systemd integration is a PITA.  That said, it does look
well done.

The howto did not mention how to install ntpd.  I would recommend
NTPsec instead of NTP Classic.  Then you get a lot more tools to
monitor your ntpd, like ntpviz, ntpmon, etc.

> I using the pps hardware and everything works properly.
> I see that the precision is high and the jitter is low.

Precision is meaningless.  It is an invented number.  Jitter is one
of the important things.  ntpviz is the way to really see how well
things are working.

> I have more of these systems scattered along a path for the relief of
> time and I would like their time to be precise at least to the
> millisecond.

You should be good to that level.  You should be doing a lot
better than that.

> I have an application that receives this information via
> TCP, but my problem is that this application not know if the time on
> the GPS has already been fixed or not and what accuracy it has.

Yup, always a problem, especially on Raspberry Pi with no RTC.

> My application by connecting with a socket to gpsd, what information
> should be read to know if the system has received the fix (every 12.5
> minutes) and the current accuracy?

A few things to note here.  A GPS fix has nothing at all to do with 12.5
minutes.  12.5 minutes is how often the almanac is broadcast.  A modern
GPS, like the Adafruit, does not need the full almanac to be precise.

All a GPS needs is the current leap seconds and a current ephemeris.
Both are usually stored by the GPS so it can do a "warm start" which
should take less than a minute.  Sometimes much less.

The "current accuracy" is something extremely hard to know.  "accuracy"
implies traceability to NIST or other standards body.  That is an
advanced topic.  All you can know is your jitter and drift.  

jitter and drift will be under a microsecond right away, and slowly
improve.  CPU load and temperature will affect them.  You see those
long term effects using ntpviz.

The main gotcha is that some GPS will report time before they know
the leap seconds.  So you might be 18 seconds off until the leap seconds
are known.  Check your GPS documentation for guidance, different
GPS handle this differently.  If you build from git head you can see the
current leap seconds in the JSON.

In any case, it is best to leave ntpd and gpsd running all the time, so
that should not be a problem.

> (Sorry for my english)

No worries, much better than my Italian.

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

reply via email to

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