TECS: enable specific energy weights to have a value up to 2

This commit is contained in:
Konrad
2024-05-07 14:20:07 +02:00
committed by KonradRudin
parent f8a20e1964
commit f56f4c7033
+2 -4
View File
@@ -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;
}