Skip to content

Commit

Permalink
Only emit kalman filter values when a position result is delivered if…
Browse files Browse the repository at this point in the history
… the filter

actually used that result.
  • Loading branch information
mutability committed Apr 29, 2015
1 parent 3178852 commit b789757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlat/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b789757

Please sign in to comment.