From 3ccd8fbba5a35fddabd30634ff41e2e32b58a2a0 Mon Sep 17 00:00:00 2001 From: Balduin Date: Thu, 8 Jan 2026 15:21:55 +0100 Subject: [PATCH] ControlAllocator: clearer comment, skip unnecessary check --- .../ActuatorEffectivenessRotors.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.cpp b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.cpp index 17ba1bd9d4..300895c472 100644 --- a/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.cpp +++ b/src/modules/control_allocator/VehicleActuatorEffectiveness/ActuatorEffectivenessRotors.cpp @@ -196,13 +196,11 @@ ActuatorEffectivenessRotors::computeEffectivenessMatrix(const Geometry &geometry float ct = geometry.rotors[i].thrust_coef; float km = geometry.rotors[i].moment_ratio; - // When battery depletes, scale rises above 1 (initially - // designed as a compensation factor to multiply thrust and - // torque commands with). Rather than that we model it here by a decreasing - // thrust coefficient (thrust = ct * u^2) - if (battery_scale > 1.f) { - ct /= battery_scale; - } + // When battery depletes, scale rises above 1, as it was + // initially designed as a compensation factor to multiply + // thrust and torque commands with. Rather than that we model it + // here by a decreasing thrust coefficient. + ct /= battery_scale; if (geometry.propeller_torque_disabled) { km = 0.f;