mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 12:00:35 +08:00
[TECS]: If in airspeedless mode, add the throttle integrator term to the throttle setpoint, if the integrator term is positive. This should avoid reducing airspeed when switching to airspeedless mode. (#20987)
This commit is contained in:
@@ -609,8 +609,13 @@ float TECSControl::_calcThrottleControlOutput(const STERateLimit &limit, const C
|
||||
// Add the integrator feedback during closed loop operation with an airspeed sensor
|
||||
throttle_setpoint += _throttle_integ_state;
|
||||
|
||||
} else {
|
||||
/* We want to avoid reducing the throttle output when switching from airspeed enabled mode into airspeedless mode.
|
||||
Thus, if the throttle integrator has a positive value, add it still to the throttle setpoint. */
|
||||
throttle_setpoint += math::max(0.0f, _throttle_integ_state);
|
||||
}
|
||||
|
||||
|
||||
// ramp in max throttle setting with underspeediness value
|
||||
throttle_setpoint = _ratio_undersped * param.throttle_max + (1.0f - _ratio_undersped) * throttle_setpoint;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user