AP_NAvEKF3: use #define value for bad IMU hold time

This commit is contained in:
Paul Riseborough
2021-07-22 18:20:45 +10:00
committed by Andrew Tridgell
parent 9654697415
commit 5fa3ed5755
2 changed files with 4 additions and 1 deletions
@@ -693,7 +693,7 @@ void NavEKF3_core::FuseVelPosNED()
} else {
goodIMUdata_ms = imuSampleTime_ms;
}
if (imuSampleTime_ms - badIMUdata_ms < 10000) {
if (imuSampleTime_ms - badIMUdata_ms < BAD_IMU_DATA_HOLD_MS) {
badIMUdata = true;
} else {
badIMUdata = false;
+3
View File
@@ -102,6 +102,9 @@
// Number of milliseconds of bad IMU data before a reset to vertical position and velocity height sources is performed
#define BAD_IMU_DATA_TIMEOUT_MS 1000
// number of milliseconds the bad IMU data response settings will be held after the last bad IMU data is detected
#define BAD_IMU_DATA_HOLD_MS 10000
class NavEKF3_core : public NavEKF_core_common
{
public: