Package: radioclk
Version: 1.0-1
Severity: important

Hello,

When the offset between system time and radio time is around an integer
number of seconds, radioclkd 1.0 wrongly calculates the offset to the
nearest plain second.

Examples:

 - If the real offset is +950 ms, radioclk will put into shared memory a
time whose offset is -50 ms.
 - If real offset is +2050 ms, radioclk says +50.
 - If real offset is +1500 ms, radioclk rightly says +1500.

This may lead ntpd to wrongly sync to the nearest plain second instead
of the true time, if the offset at startup is near this plain second
(±128 ms it seems), and if radioclk is the single source of time.

Problem seems to be in CalculatePPSAverage() design. It uses only
tv_usec member of pulse timestamps, totally ignoring tv_sec.

Possible solution could be either:

 - Don't call CalculatePPSAverage() when the offset is over 128 ms.
 - Redesign CalculatePPSAverage() to make use of tv_sec so it works in
any conditions.


Alain.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to