EKF: Rework nav validity reporting

Remove duplicate checking for dead reckoning and consolidate into a single function.
Use separate timers to check for start of dead reckoning and check when dead reckoning has been performed for too long for the nav solution to be valid.
Allow the timeout for validity reporting to be adjusted externally.
Separate external reporting of dead reckoning from internal checks.
This commit is contained in:
Paul Riseborough
2018-03-22 09:31:52 +11:00
committed by Daniel Agar
parent bd72f3c521
commit 9747dc778d
6 changed files with 21 additions and 13 deletions
+2 -6
View File
@@ -136,12 +136,8 @@ void Ekf::controlFusionModes()
// Additional NE velocity data from an auxiliary sensor can be fused
controlAuxVelFusion();
// report dead reckoning if we are no longer fusing measurements that directly constrain velocity drift
_is_dead_reckoning = (_time_last_imu - _time_last_pos_fuse > _params.no_aid_timeout_max)
&& (_time_last_imu - _time_last_delpos_fuse > _params.no_aid_timeout_max)
&& (_time_last_imu - _time_last_vel_fuse > _params.no_aid_timeout_max)
&& (_time_last_imu - _time_last_of_fuse > _params.no_aid_timeout_max);
// check if we are no longer fusing measurements that directly constrain velocity drift
update_deadreckoning_status();
}
void Ekf::controlExternalVisionFusion()