mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_TECS: Use aircraft stall speed
When stall prevention is enabled we were scaling from the aircraft's minimum flight speed. However this is normally already picked as being above the stall speed, and for a variety of reasons we may want to pin the aircraft at a higher minimum speed. But if the aircraft was commanded to fly to close to that minimum speed as soon as it banked for a pattern it would command a increase in speed to keep it away from stalling. However if your minimum speed is far from stalling this increase was incorrect. To make it worse what this actually results in happening is an aircraft diving for more speed (over 10 m/s on some aircraft) as well as descending to gain that speed resulting in over 200 foot deviations in altitude control.
This commit is contained in:
parent
80277e6da0
commit
edaddc0431
@ -415,7 +415,11 @@ void AP_TECS::_update_speed(float DT)
|
||||
if (aparm.stall_prevention) {
|
||||
// when stall prevention is active we raise the minimum
|
||||
// airspeed based on aerodynamic load factor
|
||||
_TASmin *= _load_factor;
|
||||
if (is_positive(aparm.airspeed_stall)) {
|
||||
_TASmin = MAX(_TASmin, aparm.airspeed_stall*EAS2TAS*_load_factor);
|
||||
} else {
|
||||
_TASmin *= _load_factor;
|
||||
}
|
||||
}
|
||||
|
||||
if (_TASmax < _TASmin) {
|
||||
|
Loading…
Reference in New Issue
Block a user