From f56f4c7033540bf3e3df102e9c59d9b2de7a25c4 Mon Sep 17 00:00:00 2001 From: Konrad Date: Tue, 13 Feb 2024 08:49:39 +0100 Subject: [PATCH] TECS: enable specific energy weights to have a value up to 2 --- src/lib/tecs/TECS.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/tecs/TECS.cpp b/src/lib/tecs/TECS.cpp index 082cc12347..b6ac0d8fca 100644 --- a/src/lib/tecs/TECS.cpp +++ b/src/lib/tecs/TECS.cpp @@ -402,10 +402,8 @@ TECSControl::SpecificEnergyWeighting TECSControl::_updateSpeedAltitudeWeights(co } - // don't allow any weight to be larger than one, as it has the same effect as reducing the control - // loop time constant and therefore can lead to a destabilization of that control loop - weight.spe_weighting = constrain(2.0f - pitch_speed_weight, 0.f, 1.f); - weight.ske_weighting = constrain(pitch_speed_weight, 0.f, 1.f); + weight.spe_weighting = constrain(2.0f - pitch_speed_weight, 0.f, 2.f); + weight.ske_weighting = constrain(pitch_speed_weight, 0.f, 2.f); return weight; }