ekf2: reset the timeout timer in the reset function directly

This commit is contained in:
bresch
2021-12-09 13:55:59 +01:00
committed by Mathieu Bresciani
parent 0d874cf00a
commit 5e790da634
2 changed files with 3 additions and 2 deletions
-2
View File
@@ -734,8 +734,6 @@ void Ekf::controlHeightSensorTimeouts()
// Reset vertical position and velocity states to the last measurement
if (request_height_reset) {
resetHeight();
// Reset the timout timer
_time_last_hgt_fuse = _time_last_imu;
}
}
}
+3
View File
@@ -345,6 +345,9 @@ void Ekf::resetHeight()
// that does not destabilise the filter
P.uncorrelateCovarianceSetVariance<1>(6, 10.0f);
}
// Reset the timout timer
_time_last_hgt_fuse = _time_last_imu;
}
// align output filter states to match EKF states at the fusion time horizon