[time-nuts] GPS for ntp

Tom Van Baak tvb at LeapSecond.com
Tue Oct 21 12:09:12 EDT 2014


> With HW capture, you can get an accurate view of when the event took 
> place but only relative to the counter in the particular timer/capture 
> unit that is being used.

True.

> You have to synchronise between the counter 
> value and what the OS understands is 'system time' in order to create a 
> retrospective timestamp for when the event occured.

Also true.

One solution to the problem is use two independent HW capture inputs. One for a GPS 1PPS and the other for your event.

In this case the system clock does not need to be synchronized -- since it is used only to interpolate between the two events. The event timestamp is little more than adding the differential of the two most recent captures, which is a number from 0 to 1 second.

For added precision, and if your system oscillator happens to be many ppb fast or slow, you simply adjust the differential by that small rate offset. There is no need to actually set the system clock (time) or need to discipline the system clock (rate). Since you're capturing a GPS/1PPS snapshot every second, the clock rate offset is effectively measured every second for free.

/tvb




More information about the time-nuts mailing list