diff --git a/ntp-proto/src/algorithm/kalman/source.rs b/ntp-proto/src/algorithm/kalman/source.rs index b5e1ca756..5891e7a37 100644 --- a/ntp-proto/src/algorithm/kalman/source.rs +++ b/ntp-proto/src/algorithm/kalman/source.rs @@ -437,13 +437,16 @@ impl SourceFilter { return false; } + // This was a valid measurement, so no matter what this represents our current itertation time + // for the purposes of synchronizing + self.last_iter = measurement.localtime; + // Filter out one-time outliers (based on delay!) if !self.prev_was_outlier && (measurement.delay.to_seconds() - self.roundtriptime_stats.mean()) > algo_config.delay_outlier_threshold * self.roundtriptime_stats.variance().sqrt() { self.prev_was_outlier = true; - self.last_iter = measurement.localtime; return false; }