diff --git a/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.cpp b/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.cpp index 83be2a3b33..4b28f44dac 100644 --- a/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.cpp +++ b/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.cpp @@ -219,7 +219,7 @@ ControlAllocationSequentialDesaturation::mixYaw() // Change yaw acceleration to unsaturate the outputs if needed (do not change roll/pitch), // and allow some yaw response at maximum thrust ActuatorVector max_prev = _actuator_max; - _actuator_max += (_actuator_max - _actuator_min) * 0.15f; + _actuator_max += (_actuator_max - _actuator_min) * MINIMUM_YAW_MARGIN; desaturateActuators(_actuator_sp, yaw); _actuator_max = max_prev; diff --git a/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.hpp b/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.hpp index 53c422cd39..dfa69d9777 100644 --- a/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.hpp +++ b/src/modules/control_allocator/ControlAllocation/ControlAllocationSequentialDesaturation.hpp @@ -57,6 +57,10 @@ public: void allocate() override; void updateParameters() override; + + // This is the minimum actuator yaw granted when the controller is saturated. + // In the yaw-only case where outputs are saturated, thrust is reduced by up to this amount. + static constexpr float MINIMUM_YAW_MARGIN{0.15f}; private: /**