]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fixed from Dave Mills.
authorHarlan Stenn <stenn@ntp.org>
Fri, 26 Mar 2004 02:20:54 +0000 (21:20 -0500)
committerHarlan Stenn <stenn@ntp.org>
Fri, 26 Mar 2004 02:20:54 +0000 (21:20 -0500)
bk: 40639386remX5y-imZT_G_s6Ux8xsA

ntpd/ntp_loopfilter.c

index ece80a1573b0b6a85d27ae93528713cfaeec7d9f..df3bfc6ca765969dbf287207c766bce5c8719351 100644 (file)
@@ -38,8 +38,8 @@
 #define CLOCK_MINSTEP  900.    /* default stepout threshold (s) */
 #define CLOCK_PANIC    1000.   /* default panic threshold (s) */
 #define        CLOCK_PHI       15e-6   /* max frequency error (s/s) */
-#define CLOCK_PLL      16.     /* PLL loop gain */
-#define CLOCK_FLL      8.      /* FLL loop gain */
+#define CLOCK_PLL      16.     /* PLL loop gain (log2) */
+#define CLOCK_FLL      (NTP_MAXPOLL + 1.) /* FLL loop gain */
 #define CLOCK_AVG      4.      /* parameter averaging constant */
 #define        CLOCK_ALLAN     1500.   /* compromise Allan intercept (s) */
 #define CLOCK_DAY      86400.  /* one day in seconds (s) */
@@ -455,7 +455,7 @@ local_clock(
                         * the rules of fair engagement are broken.
                         */
                        if (ULOGTOD(sys_poll) > allan_xpt / 2) {
-                               dtemp = NTP_MAXPOLL + 1 - sys_poll;
+                               dtemp = CLOCK_FLL - sys_poll;
                                flladj = (fp_offset - clock_offset) /
                                    (max(mu, allan_xpt) * dtemp);
                        }