From 24da87db1218fe0e3270d8025e2851923139b0b9 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Thu, 20 Feb 2025 09:28:27 +0100 Subject: [PATCH] FW Position Control: keep flaps in landing config during abort if below AIRSPD_MIN (#23877) Signed-off-by: Silvan Fuhrer --- src/modules/fw_pos_control/FixedwingPositionControl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/fw_pos_control/FixedwingPositionControl.cpp b/src/modules/fw_pos_control/FixedwingPositionControl.cpp index 5a55be1cc8..e939a56f54 100644 --- a/src/modules/fw_pos_control/FixedwingPositionControl.cpp +++ b/src/modules/fw_pos_control/FixedwingPositionControl.cpp @@ -1316,7 +1316,15 @@ FixedwingPositionControl::control_auto_loiter(const float control_interval, cons } else { // continue straight until vehicle has sufficient altitude + // keep flaps in landing configuration if the airspeed is below the min airspeed (keep deployed if airspeed not valid) roll_body = 0.0f; + + if (!_airspeed_valid || _airspeed_eas < _performance_model.getMinimumCalibratedAirspeed()) { + _flaps_setpoint = _param_fw_flaps_lnd_scl.get(); + + } else { + _flaps_setpoint = 0.f; + } } is_low_height = true; // In low-height flight, TECS will control altitude tighter