From b78975723c5d280157e334da4706c473276f101c Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Wed, 29 Apr 2015 19:50:27 +0100 Subject: [PATCH] Only emit kalman filter values when a position result is delivered if the filter actually used that result. --- mlat/output.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlat/output.py b/mlat/output.py index c9310cf..a586e60 100644 --- a/mlat/output.py +++ b/mlat/output.py @@ -82,7 +82,7 @@ def write_result(self, receive_timestamp, address, ecef, ecef_cov, receivers, di else: err_est = -1 - if kalman_state.valid: + if kalman_state.valid and kalman_state.last_update >= receive_timestamp: line = self.KTEMPLATE.format( t=receive_timestamp, address=address, @@ -193,7 +193,7 @@ def send_heartbeats(self): def write_result(self, receive_timestamp, address, ecef, ecef_cov, receivers, distinct, kalman_data): try: if self.use_kalman_data: - if not kalman_data.valid: + if not kalman_data.valid or kalman_data.last_update < receive_timestamp: return lat, lon, alt = kalman_data.position_llh