Harlen’s idea may be right. If your GPS is seeing a lot of SVs then the NMEA stream can overrun the second. The time used is that of the end of the the first recognized NMEA sentence containing the time field in the cycle. If you are able to send the commands necessary, you can limit the data stream length by selecting just $GPRMC which is often the first sent. The NMEA command to do that depends on the receiver. What make/model do you have?
To check on what your device is sending, cat your NMEA device. $ sudo cat /dev/gps0 # that will get the whole stream You can check the UTC date from one sentence against another source to see if the seconds field is right. It could be that the receiver isn’t counting in leap seconds correctly. I had that with one receiver. Does your GPS have PPS output? If you have a scope you can check if the data is running into the following second. Have fun > Le 23 janv. 2017 à 13:03, Harlan Stenn <st...@ntp.org> a écrit : > > Lloyd Dizon writes: >> Hi. >> I've installed a GPS module on a Raspberry Pi and I'm getting 1000ms >> offsets between the GPS readings and network NTPs. >> >> lloyd@jadzia:~ $ ntpq -p >> remote refid st t when poll reach delay offset >> jitter >> ============================================================================= >> = >> LOCAL(0) .LOCL. 10 l 447 64 100 0.000 0.000 >> 0.001 > > Why are you using the LOCAL refclock? > >> xGPS_NMEA(0) .GPS. 0 l - 16 377 0.000 6.229 >> 142.320 > > Is your NMEA source identifying the wrong second? > >> *ntp0.as34288.ne 85.158.25.74 2 u 24 64 3 9.810 1004.83 >> 1.687 >> +246.11.25.212.f 162.23.41.10 2 u 19 64 3 10.636 1004.22 >> 1.376 >> +ch-ntp01.10g.ch 81.94.123.17 3 u 21 64 3 10.493 1001.79 >> 3.299 >> -khyber.madduck. 192.33.96.102 2 u 20 64 3 8.703 1001.72 >> 4.474 > > Your NMEA source is sending ntpd samples every 16 seconds. It's filling > the sample buffer, and the the other sources (are you using iburst on > these? You should be...) are taking a while to provide enough samples > to detect that your NMEA source is "off" by a second. > >> Sometimes it will be the GPS which will have 1000ms offset and the NTP >> serveurs will have 4-6ms instead. >> >> Anybody has a clue what is going on? > > I think your NMEA signal is identifying the wrong second. > -- > Harlan Stenn <st...@ntp.org> > http://networktimefoundation.org - be a member! > _______________________________________________ > questions mailing list > questions@lists.ntp.org > http://lists.ntp.org/listinfo/questions "The power of accurate observation is commonly called cynicism by those who have not got it. » George Bernard Shaw _______________________________________________ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions