EKF2: reset aid src when resetting state to measurement

Filtered innovations and test ratios can be large before the reset and
would trigger pre-flight warnings
This commit is contained in:
bresch
2024-12-13 14:26:57 +01:00
committed by Mathieu Bresciani
parent eb829676b0
commit fad9ae855d
7 changed files with 29 additions and 18 deletions
@@ -345,12 +345,10 @@ TEST_F(EkfHeightFusionTest, baroRefAllHgtFailReset)
// Also check the reset counters to make sure the reset logic triggered
reset_logging_checker.capturePostResetState();
EXPECT_TRUE(reset_logging_checker.isVerticalPositionResetCounterIncreasedBy(1));
// The velocity does not reset as baro only provides height measurement
EXPECT_TRUE(reset_logging_checker.isVerticalVelocityResetCounterIncreasedBy(0));
// The height resets twice in a row as the baro innovation is not corrected after a height
// reset and triggers a new reset at the next iteration
EXPECT_TRUE(reset_logging_checker.isVerticalPositionResetCounterIncreasedBy(2));
}
TEST_F(EkfHeightFusionTest, changeEkfOriginAlt)