You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/AP_TECS/AP_TECS.cpp
+14-11Lines changed: 14 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -933,20 +933,23 @@ void AP_TECS::_update_throttle_without_airspeed(int16_t throttle_nudge, float pi
933
933
934
934
voidAP_TECS::_detect_bad_descent(void)
935
935
{
936
+
// Don't detect bad descents when gliding, transitioning, or when underspeed.
937
+
if (_flags.is_gliding || _flight_stage == AP_FixedWing::FlightStage::VTOL || _flags.underspeed) {
938
+
_flags.badDescent = false;
939
+
return;
940
+
}
941
+
936
942
// Detect a demanded airspeed too high for the aircraft to achieve. This will be
937
943
// evident by the following conditions:
938
-
// 1) Underspeed protection not active
939
-
// 2) Specific total energy error > 200 (greater than ~20m height error)
940
-
// 3) Specific total energy reducing
941
-
// 4) throttle demand > 90%
942
-
// If these four conditions exist simultaneously, then the protection
943
-
// mode will be activated.
944
-
// Once active, the following condition are required to stay in the mode
945
-
// 1) Underspeed protection not active
946
-
// 2) Specific total energy error > 0
947
-
// This mode will produce an undulating speed and height response as it cuts in and out but will prevent the aircraft from descending into the ground if an unachievable speed demand is set
944
+
// 1) Specific total energy error > 200 (greater than ~20m height error)
945
+
// 2) Specific total energy reducing
946
+
// 3) throttle demand > 90%
947
+
// If these conditions exist simultaneously, then the protection mode will be activated.
948
+
// Once active, it will remain active until the specific total energy error drops below 0.
949
+
// This mode will produce an undulating speed and height response as it cuts in and out, but it
950
+
// will prevent the aircraft from descending into the ground if an unachievable speed demand is set.
0 commit comments