[ntp:questions] Refclock Oncore Driver Change

Thomas Laus lausts at acm.org
Sat May 4 14:03:54 UTC 2019


Group:

The Motorola Oncore receiver has recently become non-usable because of the
recent GPS week rollover.  The receiver year field is limited by the receiver
to the years from 1988 to 2018.  The current driver is not able to write
the year 2019 successfully.

I have looked overr the refclock_oncore.c driver program and have some thoughts.
The is a section of the code that makes a conversion of Unix time to GPS time.
There is a 70 year constant applied to the message sent to the receiver and
received from the refclock.  I think that this constant could be 'fudged' to
either add or subtract hex 0x24ea0000 (decimal 619315200) for the number of
seconds in a 1024 GPS week.  I looked at the date in my Oncore and converted
it to Unix time.  I subtracted this factor from my system date and the numbers
matched.

I send an email to the person that last made a change to the refclock_oncore
driver program and have not received a reply yet.  I ask this group if my idea
has any hidden 'gotchas'.  The Oncore driver already has sections for the
different models.  I am proposing using the conversion factor for
the 6 and 8 channel receivers and leave the code alone for the M12 receiver.
Are there any model VT, VP, GT, UT receivers that handled the recent rollover
correctly?  Are there any M12 receivers that need this fix?

The code is a little complicated in ntp_unixtime.h because of the size of the
number is greater than a 32 bit INT and my 'C' skills are a little rusty.
I plan on working on this next week and see if my idea is valid.  It would
be great to have my Oncore back in operation for another 19 years and not
requiring a replacement receiver.  I am going to concentrate on making
the chage to the ntp_unixtime.h file because other refclocks might require
a similar fix.  Am I on the right path or is there a better way?  The receiver
will still think that the year is in the correct range, but all date in and
out of ntp will be correct.

Tom

-- 
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF



More information about the questions mailing list