Buggy WNRO fixup

Gary E. Miller gem at rellim.com
Fri Dec 24 22:42:33 UTC 2021


Yo Hal!

On Fri, 24 Dec 2021 12:01:50 -0800
Hal Murray <halmurray at sonic.net> wrote:

> >> I have a NMEA unit that's off by 1024 weeks.  Somebody
> >> is fixing it twice.  
> > How do you know that?  
> 
> The time on that system got set to Nov  4  2023
> 
> The "twice" part was sloppy, but something strange was going on.
> 
> The log message says -4096 weeks which just adds to my confusion.
> 20 Dec 12:22:32 ntpd[40363]: NMEA(1) Changed GPS epoch warp to -4096
> weeks

Odd. Plus, or minus, 4096 sems way off.

Today, 24 Dec 2021, is GPS Week 2189 day 358.

From: https://www.ngs.noaa.gov/CORS/Gpscal.shtml

> The code is in ntpd/ntp_wrapdate.c
> 
> refclock_nmea calls it in at least 2 places:
> 
>         case NMEA_GPRMC:
>                 rc_date  = parse_date(&date, &rdata, 9, DATE_1_DDMMYY)
>                         && unfold_century(&date,
> lfpuint(rd_timestamp));

You are seeing $GPRMC.

>         case NMEA_PGRMF:
>                 rc_date  = rc_date
>                         && gpsfix_century(&date, &gpsw,
> &up->century_cache);

Garmin private, so you can ignore that.

>         rd_reftime = eval_gps_time(refclock_name(peer), &date, &tofs,
>                                    (peer->cfg.mode &
> NMEA_DATETRUST_MASK), &up->epoch_warp, &rd_timestamp);

That looks nothing like gpsd does...

> > Can you send this list a few seconds of your NMEA?  
> 
> $GPRMC,195031.000,A,3726.0713,N,12212.2560,W,0.00,344.40,100502,,,A*74

That is the important part.  gpsd handles that just fine:

{"class":"TPV","device":"stdin","mode":3,"time":"2021-12-24T19:50:31.000Z"...

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20211224/3e6bae44/attachment.bin>


More information about the devel mailing list