[ntp:questions] Fwd: Re: NetBSD GPS/PPS using 4.2.6p3

Brian Utterback brian.utterback at oracle.com
Thu Aug 25 12:20:35 UTC 2011

On 08/25/11 06:38, David Lord wrote:
> A pps pulse within .5 sec of the "true time" doesn't make
> any sense to me. Perhaps you meant the NMEA sentence used
> needed to be within .5 sec but again that doesn't make a
> lot of sense in practice as all three different gps units
> I've used each have large variations in NMEA time so
> require both fudge factor and increase in the range of
> values that will be accepted.

The point is that the PPS is used by the kernel to determine the offset
between the PPS and the current system clock full second. The kernel
then adjusts the clock by that offset so that the system clocks idea of
a full second matches the PPS.

But the PPS could be for any second. If the kernel was off by 2 seconds,
then the PPS would lock the system clock exactly two seconds off. It
might be a very accurate 2 seconds, but it would still be off.

To prevent this from happening, the kernel PPS code will not adjust the
clock using the PPS until NTP reports that the offset of the system
clock is less than .5 seconds so that it knows that the PPS really
represents the closest second.

To answer unruh's question, I think that there is a further requirement
because of the dispersion involved in the offset. Not only must the
offset be less than .5 seconds, but the offset +/- the dispersion must
be less than .5 seconds as well. I haven't verified this reasoning
though, the book or code may give another or different reason.


Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. - Martin Golding
Brian Utterback - Solaris RPE, Oracle Corporation.
Ph:603-262-3916, Em:brian.utterback at oracle.com

More information about the questions mailing list