mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 09:40:36 +08:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user