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: Gary E. Miller
Subject: Re: [gpsd-dev] gpsd rolls back to 1999
Date: Fri, 28 Jun 2019 13:52:30 -0700

Yo All!

Do we want to be fixing NTPsec bugs on gpsd-dev@ ?

On Fri, 28 Jun 2019 08:15:17 -0400
"Eric S. Raymond" <address@hidden> wrote:

> Sanjeev Gupta <address@hidden>:
> > Eric, on the gpsd TODO:
> > 
> > https://www.febo.com/pipermail/time-nuts/2013-August/079271.html  
> 
> Reproducing the patch here so it's part of the record of our
> discussion:
> 
> --- refclock_nmea.c.orig      2010-11-10 03:38:22.000000000 +0000
> +++ refclock_nmea.c   2013-08-13 20:05:44.000000000 +0100
> @@ -979,6 +1076,8 @@
>       date.yearday = 0; /* make sure it's not used */
>       DTOLFP(pp->nsec * 1.0e-9, &reftime);
>       reftime.l_ui += caltontp(&date);
> +     while (reftime.l_i + 512*7*86400 < rd_timestamp.l_i)
> +             reftime.l_i += 1024*7*86400;
>  
>       /* $GPZDG postprocessing first... */
>       if (NMEA_GPZDG == sentence) {
> 
> It does this: Look a half-era ahead.  If that's still less than a
> reference date, shift the time stamp forward N cycles for the minimum
> N that will take it past the reference date.
> 
> I'm not certain what the reference date is, because the context
> doesn't exactly match anything in our code.  If it were me writing
> the code it would be the build date of the instance.
> 
> That might work, but it makes me nervous. Perly is not a dimwit; if 
> compensating for wraparound is that easy, why the magic calendar hack?
> 
> This whole area is full of traps.  We need to proceed very carefully.




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpksifME9bz0.pgp
Description: OpenPGP digital signature


reply via email to

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