[ntp:questions] 1000s offset between GPS module and NTP servers

juergen perlinger juergen.perlinger at t-online.de
Tue Jan 24 21:47:48 UTC 2017


Hi Lloyd,

> Hi all.
> I'm using this GPS module with a MTK3339 chipset. Bought from here:
> https://www.adafruit.com/product/790
> And I'm using ntpd with have PPS support compiled-in.
> 
> Juergen, thanks for pointing out the documentation. I've understood more
> about NMEA receivers now.
> 
> I've tried Brian's and Juergen's server and fudge configuration, using
> time2 to align with the NMEA data-stream and now getting better results.
> I don't have a scope, so how do you suggest I determine the correct values
> to use for time2 ?

It's a bit of a chicken-egg problem. An easy way would be to have some
decent time servers (you seem to have that) and mark you cklock to
calibrate as 'noselect'. Take a note of the offset every hour or every
other hour, and after some time (1/2 day or so -- the longer, the
better) you have enough samples to get a decent correction for your
initial estimate. (don't forget to remove the noselect statement after
setting the final fudge value ;)

There are also some more hints about fudge calibration in the ntp docs,
but that needs some digging. I guess there are more elaborate ways, but
this worked for me.

Note that the serial timing (time2) is only critical if there is no PPS
signal. Fine tuning of the PPS delay (time1) needs more equipment, I'm
afraid. I never went into that -- for my purposes 50usec is definitely
close enough. (That's a guesstimate, of course. Most of it will be
caused by interrupt latency.)

> 
> server 127.127.20.0 mode 17 prefer minpoll 4 maxpoll 4
> fudge  127.127.20.0 flag1 1 flag3 1 time2 0.500 # pps kernel msg offset .5s
> 
> 
>      remote           refid      st t when poll reach   delay   offset
> jitter
> ==============================================================================
> *GPS_NMEA(0)     .GPS.            0 l   15   16  377    0.000  -49.176
> 25.007
> +time.sunrise.ne 195.141.230.78   2 u   22   64  377    8.357  114.864
> 17.534
> +192.33.214.47   129.194.21.195   2 u   23   64  377   13.382  115.777
> 18.286
> +ntp0.as34288.ne 85.158.25.74     2 u   32   64  377    6.914  113.929
> 17.013
> +eudyptula.init7 217.147.223.78   3 u   26   64  377    9.683  115.067
> 17.673
> 



More information about the questions mailing list