[email protected] writes:
>Hello everybody,
>I'm trying to track (offline) the drift of my gps clock relative to my
"your" gps clock does not drift. Your HW clock may drift.
The time sent out by GPS is accurate to a few nanoseconds. Your hardware
clock is not.
>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).
No idea what it is that you are trying to do.
I think you would like to do the opposite. Assume that GPS is thedefined
correct time for the earth. Figure out what your hardware clock is wrt to
that correct time.
>My GPS clock is built from the shmPPS driver & a garmin 18 LVC GPS.
>I'm using linux 2.6.25 with ntp 4.2.4.
>1)My first idea was to recreate (off line) the hw timestamps by
>-inverting the NTP kernel clock discipline algorithm
>-feeding it with the loopstats statistics and my gps time series
??? It is a dissipative system. going backwards is highly unstable.
>but the kernel discipline does much more that applying the loopstats
>input data
>(it runs its own PLL in the kernel)
>so it doesn't seem practically feasible
>2)I try to disable the kernel disciple (disable kernel) to run the PLL
>in user space, and capture the basic adjtime systems calls. But in
>this case when I strace the adjtimex system calls,
>most parameters are empty & it returns an error:
Again, no idea what you are trying to do.
>15:03:44.881187 adjtimex({modes=ADJ_OFFSET|0x8000, offset=0,
>freq=5528944, maxerror=731664, esterror=16, status=STA_UNSYNC,
>constant=4, precision=1, tolerance=33554432, time={1232373824,
>881222}, tick=10000, ppsfreq=0, jitter=0, shift=0, stabil=0, jitcnt=0,
>calcnt=0, errcnt=0, stbcnt=0}) = 5 (TIME_ERROR)
>so it doesn't seem to work. (furthemore it doesn't not seem to be a
>good solution when high accuracy is needed)
>3)Is there a simple way to do that? It seems very simple but I'm not
>from the domain.
>Has a hw clock driver clock already been implemented to do such an
>operation?
What operation?
>If so, I imagine the peerstats it would generate could help me.
Help you to do what?
Note that the peerstats log will tell you what the difference is between
your hardware clock and the best estimate of the GPS clock. What more do
you want? If youwant you could disable ntp using the GPS clock to
discipline itself. You certainly cannot reverse the clock discipline to
figure out what your clock would have read had ntp discipline not been
applied. (Well, you could take the readings of the frequency drift rate
correction and integrated them up.)
>Regards
>Ryad
_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.org/mailman/listinfo/questions