From 0b2af5c5190c400c67335137f067dd8e8a64735e Mon Sep 17 00:00:00 2001 From: RomanBapst Date: Fri, 28 Jun 2019 09:59:21 +0200 Subject: [PATCH] FixedWingAttitudeControl: don't lock integrator during transition - airframes that are not well trimmed rely on the integrator to learn the offset. This change can help improve altitude hold during transitions Signed-off-by: RomanBapst --- src/modules/fw_att_control/FixedwingAttitudeControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index bf9df5844b..c1b59ded73 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -562,7 +562,7 @@ void FixedwingAttitudeControl::run() /* lock integrator until control is started */ bool lock_integrator = !_vcontrol_mode.flag_control_rates_enabled - || _vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING; + || (_vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING && ! _vehicle_status.in_transition_mode); /* Simple handling of failsafe: deploy parachute if failsafe is on */ if (_vcontrol_mode.flag_control_termination_enabled) {