mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +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) {
|
if (is_flow_required) {
|
||||||
resetFlowFusion();
|
resetFlowFusion();
|
||||||
|
|
||||||
|
if (_hagl_sensor_status.flags.flow && !isTerrainEstimateValid()) {
|
||||||
|
resetTerrainToFlow();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
stopFlowFusion();
|
stopFlowFusion();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user