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

Terje Mathisen terje.mathisen at hda.hydro.com
Tue Jan 20 07:03:39 UTC 2009


ryad.bek at gmail.com wrote:
> On Jan 19, 10:26 pm, Terje Mathisen <terje.mathi... at hda.hydro.com>
> wrote:
>> ryad.... at gmail.com wrote:
>>> Hello everybody,
>>> I'm trying to track (offline) the drift of my gps clock relative to my
>>> hw clock (the clock that I would have obtained without GPS).
>>> My final goal is to convert a series of gps timestamps to the
>>> equivalent hw timestamps (with microsec precision).

You can get us precision but not accuracy!

>> This is actually quite easy:
>>
>> Just enable logging of the loop frequency (i.e. the freq offset), and
>> integrate that value over time.
>>
>> This gives you the offset at any given time.
> 
> Smart,
> your method uses the SW clock not the HW clock
> (which eliminates the problem of the 11 mn mode)
> 
> But what I do not understand is why are integrating frequency (f)?.
> It would be easier to add the clock offset (o) (i agrre that the
> result should be the same)?

The clock offset will always tend to zero, that is after all exactly 
what NTP is working so hard to achieve!

Running with logging a GPS which isn't used to steer the clock is 
actually much easier and more accurate.

You'll find that you don't need us precision: After a few hours the 
offsets will probably be into the multiple seconds range, and go off 
from that.

Terje

-- 
- <Terje.Mathisen at hda.hydro.com>
"almost all programming can be viewed as an exercise in caching"




More information about the questions mailing list