tecs: fast descend: do not shut down throttle while still climbing (#23397)

This commit is contained in:
KonradRudin 2024-07-15 10:42:43 +02:00 committed by GitHub
parent b1b0032b8d
commit 59b96f4968
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -524,8 +524,13 @@ void TECSControl::_calcThrottleControl(float dt, const SpecificEnergyRates &spec
float throttle_setpoint{param.throttle_min};
if (1.f - param.fast_descend < FLT_EPSILON) {
// During fast descend, we control airspeed over the pitch control loop and give minimal thrust.
throttle_setpoint = param.throttle_min;
// During fast descend, we control airspeed over the pitch control loop. Give minimal thrust as soon as we are descending
if (specific_energy_rates.spe_rate.estimate > 0) { // We have a positive altitude rate and are stil climbing
throttle_setpoint = param.throttle_trim; // Do not cut off throttle yet
} else {
throttle_setpoint = param.throttle_min;
}
} else {
_calcThrottleControlUpdate(dt, limit, ste_rate, param, flag);