GPS rollover in HP Driver

Eric S. Raymond esr at thyrsus.com
Tue Aug 22 22:01:46 UTC 2017


Hal Murray via devel <devel at ntpsec.org>:
> 
> I've got a box sending bogus time, but the system seems to be running happily.
> 
> I assume there is some GPS rollover fixup code someplace, but I can't find 
> it.  Anybody know where it is?
> 
> 
> There are two likely places.  On is in the HP driver itself, 
> ntpd/refclock_hpgps.c
> The other is in ntpd/ntp_refclock.c where it might fixup many drivers
> 
> I can't find "week", ""roll", or 1024 in either file.

I am certain the generic refclock code is not doing anything explicit 
to compensate for GPS rollover.  For one, I just re-skimmed it to check.
For another, if that were possible there wouldn't be ad-hoc rollover
code scattered through multiple drivers.

Looking at the hpgps driver...I don't see any rollover handling there, either.

The only other possibility I can see is that the core sync algorithms simply 
ignore any date that isn't plausibly within a certain delta of the system
clock date, using only its low-order bits and assuming the the ae is correct.
This should actually be a decent heuristic except near midnight.  

But I'm not sure how to check whether this is happening.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

Please consider contributing to my Patreon page at https://www.patreon.com/esr
so I can keep the invisible wheels of the Internet turning. Give generously -
the civilization you save might be your own.



More information about the devel mailing list