[ntp:questions] Tracking the drift of a GPS clock relative to a HW clock

Maarten Wiltink maarten at kittensandcats.net
Wed Jan 21 08:24:13 UTC 2009


<ryad.bek at gmail.com> wrote in message
news:896fd879-86c6-4c12-9528-139e59d24093 at w1g2000prk.googlegroups.com...
[...]
> I'm trying to track the drift of my GPS clock RELATIVE to
> the clock that I would have obtained without GPS (and vice versa).

If I understand you correctly, you want to generate a log with
two timestamps on each entry: one free-running, one GPS-synced.

You could _not_ run NTP on your test machine, and whenever a message
is logged, fetch a timestamp from another machine that does run NTP.
Microsecond accuracy on that machine is not very hard with a GPS
clock, but getting it into the test machine with the same accuracy
may be a bit of a problem. It's mostly a matter of having the transfer
take about the same time each time; if a good timestamp always arrives
in exactly thirty milliseconds, that's good, you can correct for that.

Another avenue is to run NTP on the test machine but not let it touch
the clock (or not let it believe the other NTP server or for that
matter any other server; you want a free-running clock). You still
need the GPS-synchronised other NTP server, but running NTP on the
test machine gives you easy, continuous, and fast access to an estimate
of the current error in the local, free-running clock, and thus an idea
of what the 'real' time is.


> My final goal is to convert a series of gps timestamps to the
> equivalent unsychronized timestamps.

Whereas I propose doing it the other way around. It produces the same
information and it's easier to do. I think.

Groetjes,
Maarten Wiltink




More information about the questions mailing list