[ntp:questions] changes to PPS handling in refclock_wwvb.c
loretta_1958 at yahoo.com
Wed May 13 23:34:39 UTC 2009
I am writing a refclock drvier that incorporates both TOD and PPS signals. I do not have kernel support for the processing of the PPS signal. It was suggested that I look at recent changes to refclock_wwvb.c (ntp-dev-4.2.5p167) for prespective on how to handle the PPS.
In the comments section for this reference clock driver it states: " When PPS signal processing is enabled, and when the system clock has been set by this or another driver and the PPS signal offset is within 0.4 s of the system clock offset, the PPS signal replaces the timecode for as long as the PPS signal is active. If for some reason the PPS signal fails for one or more poll intervals, the driver reverts to the timecode. If the timecode fails for one or more poll intervals, the PPS signal is disconnected."
I am having trouble following how these conditions are determine in the code. What status variables tell me that my TOD signal has already updated the system clock such that the estimated offset is <= 0.4s? Should I be looking for code changes in ntp_refclock.c to determine this?
More information about the questions