EKF: Enable fallback to baro alt when using range finder for height

This commit is contained in:
Paul Riseborough
2016-03-13 21:17:51 +11:00
parent 370f643f42
commit c58ab3e256
5 changed files with 52 additions and 20 deletions
+2 -2
View File
@@ -159,8 +159,8 @@ void Ekf::controlFusionModes()
// Handle the case where we have rejected height measurements for an extended period
// This excessive vibration levels can cause this so a reset gives the filter a chance to recover
// After 10 seconds without aiding we reset to the height measurement provided the data is fresh
if ((_time_last_imu - _time_last_hgt_fuse > 10e6) && (_time_last_imu - _time_last_baro < 5e5)) {
// After 10 seconds without aiding we reset to the height measurement
if (_time_last_imu - _time_last_hgt_fuse > 10e6) {
// Reset vertical position and velocity states to the last measurement
resetHeight();
}