ekf2-terrain: make terrain validity based on uncertainty

When using optical flow for terrain aiding, we cannot assume that the
terrain estimate is valid if flow is fused as is can only be observed
during motion. When no direct observation is available, the terrain is
assumed to be valid if its 1sigma uncertainty is < 10% of the hagl.
This commit is contained in:
bresch
2024-06-25 12:05:05 +02:00
committed by Silvan Fuhrer
parent a665764b0e
commit a50ef2eb5e
5 changed files with 54 additions and 59 deletions
+2 -2
View File
@@ -178,9 +178,9 @@ TEST_F(EkfFlowTest, resetToFlowVelocityOnGround)
EXPECT_TRUE(isEqual(estimated_horz_velocity, Vector2f(0.f, 0.f)))
<< estimated_horz_velocity(0) << ", " << estimated_horz_velocity(1);
// AND: the velocity isn't reset as it is already correct
// AND: the horizontal velocity is reset to the flow value
reset_logging_checker.capturePostResetState();
EXPECT_TRUE(reset_logging_checker.isHorizontalVelocityResetCounterIncreasedBy(0));
EXPECT_TRUE(reset_logging_checker.isHorizontalVelocityResetCounterIncreasedBy(1));
EXPECT_TRUE(reset_logging_checker.isVerticalVelocityResetCounterIncreasedBy(0));
}