[time-nuts] Warped back to 1993

Magnus Danielson magnus at rubidium.dyndns.org
Thu Aug 15 02:08:11 UTC 2013


Mark and David,

On 08/14/2013 12:24 PM, Mark C. Stephens wrote:
> David, Well Done, your patch has breathed life into some refclocks I thought had reached the end of the road.
It should be noted that  they way GPS works, most if not all GPS
receivers will process the data properly including leap seconds
information, so it will only be this GPS-time to normal time conversion
which will fail.

It's not like it will go back to 1993 leap-second wise also, it simply
does not have that information.

That's why the mod looks sound to me.

Cheers,
Magnus


>
> --marki
>
> -----Original Message-----
> From: time-nuts-bounces at febo.com [mailto:time-nuts-bounces at febo.com] On Behalf Of David Malone
> Sent: Wednesday, 14 August 2013 5:44 PM
> To: Magnus Danielson
> Cc: time-nuts at febo.com
> Subject: Re: [time-nuts] Warped back to 1993
>
> On Sun, Aug 11, 2013 at 03:12:00PM +0200, Magnus Danielson wrote:
>> I'm sure that the NTP drivers can be hacked to make necessary 
>> adjustments without too much code.
> I seem to have been caught by the same time warp (or a similar one) on a GPS unit that I've been using with our NTP server since 1999.
> I doubt I will be able to update the firmware, so I've made the change shown below to the NTP NMEA refclock. It assumes that your GPS unit might be slow by a multiple of 1024 weeks, and trys to get the timestamp within 512 weeks of the current system time before feeding it to NTP.
>
> The patch seems to work for me, though it may not be pedantically correct. Hal might have some comments on if it could easily be improved. It might be an interesting option to have in the NMEA driver, but it does seem a litle hacky.
>
> 	David.
>
>
> --- 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) {
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>
>




More information about the Time-nuts_lists.febo.com mailing list