[Top][All Lists]

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

Re: PPS in GPSD vs Chrony

From: Dennis Law
Subject: Re: PPS in GPSD vs Chrony
Date: Tue, 30 Jun 2020 10:44:05 +0800

Hello Gary,

Thank you for your reply.

We have actually been using the SHM0 output from GPSD "locked" with the PPS clock in Chrony.
As per our current understanding, SHM0 takes the time directly from the NMEA without consideration for PPS.

On the other hand, the SHM1 or Sock output from GPSD already has the full complete timestamp with PPS considerations.

Therefore, is it correct to say that the SHM0 locked with PPS in Chrony is somewhat similar to the SHM1 or Sock output from GPSD?
Do correct me if I am wrong.

If both of these mechanisms are indeed similar, are there any performance benefits of one over the other?
We had a look at the PPS code in GPSD and Chrony and found the GPSD's version to be a lot more advanced (eg. handling of different PPS frequencies).
Therefore, we are wondering perhaps using GPSD's PPS would have some sort of performance benefit over Chrony's PPS.

Also, the reason we are asking is because we are trying to achieve a high accuracy of 0.1ms in our system clock by using both GPSD + Chrony.

Thank you for your time.

On Tue, Jun 30, 2020 at 1:49 AM Gary E. Miller <> wrote:
Yo Dennis!

On Mon, 29 Jun 2020 15:57:54 +0800
Dennis Law <> wrote:

> I noticed that the PPS correction used by GPSD is rather similar to
> that in Chrony.

Yup.  The PPS errors are before gpsd passes the time data to any
daemon (ntpd, chronyd ,etc.)

> In GPSD, the PPS correction is performed on top of the NMEA input and
> output to Chrony via SHM1 or Sock.

No correction based on NMEA.  All the NMEA does is tell gpsd what second
the PPS pulse refers to.

> If I am not mistaken, Chrony does the same correction when combining
> a SHM refclock and a PPS refclock. This is achieved through the
> "lock" feature in the configuration file.

Do not use "lock" with data from gpsd.  gpsd sends chronyd, and ntpd,
a full and complete timestamp.  That needs no reference, or "lock", to
anything else.

You use "lock" when you have chronyd directly read the PPS pulse, which
has no seconds part, and chronyd needs the NMEA time for the seconds part.

> Is this understanding correct?


> Also are there any benefits of using
> one over the other?

If you do not need the other features of gpsd, then no benefit to gpsd.
But there are a lot of benefits that gpsd provides, like you lat/lon,
skyview, etc.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

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

reply via email to

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