[ntp:questions] ESR looking for good GPS clocks

Terje Mathisen "terje.mathisen at tmsw.no" at ntp.org
Mon Mar 5 23:33:00 UTC 2012


Chris Albertson wrote:
> How to measure?   You need to modify the interrupt handler to raise a
> pin on a (say) parallel port. then measure the time from PPS to that
> pin going high with a time interval counter.  Such counters are cheap
> now on eBay.

What I'm asking for is GPS unit with such an interval timer embedded on 
it, said counter to be restarted on every PPS signal.

The query protocol then becomes, as seen from the host:

while (1) {
   before = gethirestime();
   gps_time = poll_gps();
   after = gethirestime();
   if (after - before < MAX_LATENCY)
     use_timestamp(after, gps_time);
   sleep(1);
}

I.e. polling the GPS (at any time) returns the current time in NTP 32:32 
format directly. There is no need to ever interrupt anything with a 
clock source you can poll at any time.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"



More information about the questions mailing list