[LinuxPPS] testing PPS with ktimer

Ken MacLeod ken at bitsko.slc.ut.us
Tue Nov 9 18:09:41 CET 2010


On Tue, Nov 9, 2010 at 10:56 AM, Hal V. Engel <hvengel at gmail.com> wrote:
> You also need another time source so that ntp can figure out what the current
> second is.  This can be another ntp server or other supported time source that
> allow ntp to resolve the time close enough to resolve an unambitious second.

Yes, I'm also using an ntp server for the time source.

> I use this when I boot over to Windows since the Windows version of ntp does
> not directly support the OnCore GPS I use only it's PPS and then external ntp
> server to resolve the second.  This takes a lot longer to sync than using the
> OnCore natively (on Linux) but it works.

I've let it do runs over 90 minutes.

I'm tracing through the ntpd code and it currently is discarding the
PPS time source around line 1310 of ntp_refclock.c in refclock_pps()
in this test:

	/*
	 * There can be zero, one or two PPS pulses between polls,
	 * depending on the poll interval relative to the PPS interval.
	 * The pulse must be newer and within the range gate relative
	 * to the last pulse.
	 */
	if (ap->ts.tv_sec <= timeout.tv_sec || abs(ap->ts.tv_nsec -
	    timeout.tv_nsec) > RANGEGATE)
		return (0);

I'm digging around here now to find out what the pattern is.



More information about the LinuxPPS mailing list