mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-14 18:57:35 +08:00
adjust IMU falling detection baro-range unittest
This commit is contained in:
committed by
Jacob Dahl
parent
aa00bdcd5d
commit
5e6c36a424
@@ -192,12 +192,13 @@ TEST_F(EkfAccelerometerTest, imuFallingDetectionBaroRange)
|
||||
_sensor_simulator.runSeconds(5);
|
||||
|
||||
EXPECT_TRUE(_ekf_wrapper.isIntendingBaroHeightFusion());
|
||||
EXPECT_TRUE(_ekf_wrapper.isIntendingRangeHeightFusion());
|
||||
|
||||
// AND: an accelerometer with a really large Z bias
|
||||
const float bias = CONSTANTS_ONE_G;
|
||||
_sensor_simulator._imu.setAccelData(Vector3f(0.f, 0.f, -CONSTANTS_ONE_G + bias));
|
||||
_sensor_simulator.runSeconds(2);
|
||||
_sensor_simulator._imu.setAccelClipping(false, false, true);
|
||||
_sensor_simulator.runSeconds(2);
|
||||
|
||||
// THEN: the bad vertical is detected because both sources agree
|
||||
EXPECT_TRUE(_ekf->fault_status_flags().bad_acc_vertical);
|
||||
|
||||
Reference in New Issue
Block a user