[Git][NTPsec/ntpsec][master] refclock_nmea: provisional fix for issue #62.
Gary E. Miller
gitlab at mg.gitlab.com
Thu Sep 14 02:13:40 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
7d49f80d by Gary E. Miller at 2017-09-14T02:08:13Z
refclock_nmea: provisional fix for issue #62.
In the NMEA refclock, when PPS is lost, the peer jitter was left at the
low value calculated for PPS. This jitter is now used for NMEA. So
the NMEA time is wrongly thought to be PPS precise. This caused the
selection algorithm to wrongly pick NMEA over other better sources.
The fix is to reset the jitter when PPS is lost.
- - - - -
1 changed file:
- ntpd/refclock_nmea.c
Changes:
=====================================
ntpd/refclock_nmea.c
=====================================
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -1136,6 +1136,15 @@ nmea_poll(
* for now.
*/
if (!up->ppsapi_gate) {
+ if ( FLAG_PPS & peer->cfg.flags ) {
+ /*
+ * PPS just turned off, reset jitter to prevent
+ * thinking the NMEA is PPS precise and thus
+ * being wrongly seelcted when better time is
+ * available elsewhere
+ */
+ peer->jitter = LOGTOD(PRECISION);
+ }
peer->cfg.flags &= ~FLAG_PPS;
peer->precision = PRECISION;
} else {
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7d49f80d0b6eda195443353f2db84fc7bea30f28
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7d49f80d0b6eda195443353f2db84fc7bea30f28
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170914/c3fb7307/attachment.html>
More information about the vc
mailing list