mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 10:37:36 +08:00
ekf2: optical flow failing also reset terrain if needed
This commit is contained in:
@@ -145,6 +145,10 @@ void Ekf::controlOpticalFlowFusion(const imuSample &imu_delayed)
|
||||
if (is_flow_required) {
|
||||
resetFlowFusion();
|
||||
|
||||
if (_hagl_sensor_status.flags.flow && !isTerrainEstimateValid()) {
|
||||
resetTerrainToFlow();
|
||||
}
|
||||
|
||||
} else {
|
||||
stopFlowFusion();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user