Re: [chrony-users] Multi-PPS+RTC Setup Questions

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


The GPS PPS should be accurate to better than a microsecond. Now with two GPS
lines coming in, there is a fight between the interrupt handlers which means
that the second will be out by up to 10us while the first one handles the
"first" interrupt.  That will of course depend on the hardware as well, and
whether the the system has multiple CPU cores, and whether the interrupts can
get distributed amongst the cores, etc. But certainly sub us accuracy and
precision should be possible with GPS PPS. The NMEA is much much much worse
than this-- there getting 10 ms accuracy can be difficult. So NMEA is one of the worst ways of getting accuracy (usually much worse than
internet ntp.) (PPS, network, NMEA, wristwatch is the order of accuracy.)

chrony already disciplines RTC, and the /var/log/chrony/rtc.log should show
you what the RTC accuracy is. RTC is a pretty poor way of getting the time, since that clock has
uncontrollable drifts-- not least from temperature variation inside the
machine. So in short order it can be seconds away from UTC.


On Tue, 29 Sep 2020, Matt Corallo wrote:

In theory the GPS should be able to provide a precision, certainly looking at the NMEA stream *should*, and definitely looking at u-blox's proprietary messages does, though as far as I can tell gpsd doesn't make any effort to expose it in a useful way (and I'm not sure how much effort should be required to do so in a vaguely cross-device manner). Even if it did, I don't see a great way to feed it into chrony, eg there's no way to pass it in via the socket interface (AFAICT, I was hoping to do this for the RTC to track its drift over time and feed it into chrony) and chrony appears to ignore the precision field in ntpshm (not that anything sets it usefully).

My PPS interrupts are serial-DCD, which has some noise, but in my case u-blox

Are thos interrupts from a usb feed or true serial ports? The interrupts
certain should NOT be off by many microseconds. It sounds more like interrupt
handling delays.

appears to be garbage and the two devices are off persistently by 30-ish us (ie an order of magnitude or so more than noise), and somehow its tied to the u-blox devices themselves (the usual swapping of all ports/antennas/etc doesn't change the fact that the two devices just have different concepts of the current time, across nearly every setting including different tick rates so they tick at different times).

That makes very little sense. And be careful that you are not picking the
wrong "side" for the interrupt-- rising edge vs falling edge.



Matt

On 9/29/20 11:48 AM, Miroslav Lichvar wrote:
On Tue, Sep 29, 2020 at 11:29:13AM -0400, Matt Corallo wrote:
Right, ok, so should I presume this isn't a bug normally, but is caused by
whatever nonsense brokenness is going on in my u-blox receivers that they
mysteriously sync to different time despite identical setups?

The problem with refclocks is that there is a missing estimate on
their accuracy, which is needed in the source selection (in terms of
the root distance). Ideally it should be provided by the user for each
clock, but it's not always needed.

It's not ununusal for PPS signals from different GPS receivers to be
slightly off from each other, but I think a larger error usually comes
from the timestamping of the pulse. If there is an interrupt involved
(e.g. pps-ldisc or pps-gpio), it will add a few microseconds of delay,
that can change over time (CPU speed, utilization, etc). If you had an
I210 and tried it with a HW-timestamped PPS, you would see how this
interrupt delay is changing.

What PPS driver do you use? Are your PPS signals configured to trigger
at different times (avoiding two interrupts at the same time)?


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/