Skip to content

Commit

Permalink
AP_TECS: Use aircraft stall speed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
WickedShell authored and tridge committed Jul 23, 2024
1 parent 80277e6 commit edaddc0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libraries/AP_TECS/AP_TECS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit edaddc0

Please sign in to comment.