gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] gpsd rolls back to 1999


From: Michael J. Tubby B.Sc. MIET
Subject: Re: [gpsd-dev] gpsd rolls back to 1999
Date: Sat, 22 Jun 2019 13:32:47 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1



On 22/06/2019 12:52, Eric S. Raymond wrote:
Michael J. Tubby B.Sc. MIET <address@hidden>:

On 22/06/2019 08:30, Hal Murray wrote:
    2. The system time being correct *before* gpsd invocation would give it
    a clue
There is no pivot logic on the ntpd side when looking at SHM.

I thought there was pivot logic for the NMEA driver, but I can't find it.  It
may be in the parse/generic driver.
There is pivot logic in the TSIP Parse Driver - I put it there about 6
months before the first roll-over in August 1999 - it goes:

    if (week_no <= 990)
        week_no += 1024;

I guess this approach would work for some (old) GPS receivers:

    if (week_no < 1024)
        week_no += 2048;

but the problem is the *very* old ones are easy to fix but the 10-12 year
old ones less so because there are other arbitary pivot points in different
firmware by different manufacturers.


We are currently in week number 2058 so I guess:

    if (week_no < 1024) {
        week_no += 2048;
    } else if (week_no < 2058) {
        week_no += 1024;
    }

might kick the can down the street for a while longer ...

Mike
These per-driver hacks are dangrous kludges that store up trouble for
the future.  They should all be ripped out.

It was what was needed at the time ... 20 years ago ;-)


There's a more robust approach to the problem in refclock_nmea.c.  Take
a look at gpsfix_century() and unfold_century().

Will look ;-)

The right thing to do would be to take all two-digit dates and GPS
dates through the same unfolding logic. That is, the TSIP Parse Driver
(and other GPS types) should share the same date disambiguation logic
as the NMEA driver.

After we ship the point release I'll do a bit of refactoring to
facilitate this - move that code out of refclock_nmea.c and put it in
libntp where refclocks can call it.

That makes sense ;-)




--

Michael J Tubby B.Sc. (Hons) MIET / Technical Director
Email: address@hidden
Direct: +44 (0)1905 752892
Mobile: +44 (0)7973 225144

Thorcom Systems Limited
Phone: +44 (0)1905 756 700
Address: Unit 4, 96B Blackpole Trading Estate West, Worcester, WR3 8TJ, England, UK
Company registered in England & Wales No. 02704696 / VAT Number GB487925681 / EORI GB487925681000

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed.
Any views or opinions expressed are solely those of the author and do not necessarily represent those of Thorcom Systems Limited.
If you are not the intended recipient of this email, you must not take any action based upon its contents or disclose it to any third-party.
Please contact the sender if you believe you have received this email in error.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]