From 1a782b7834f2a4832f489fd7560af1446d0d75bb Mon Sep 17 00:00:00 2001 From: George Zogopoulos Date: Tue, 28 May 2024 15:41:17 +0200 Subject: [PATCH] Use at least TRIM_THROTTLE during the climb --- libraries/AP_TECS/AP_TECS.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/AP_TECS/AP_TECS.cpp b/libraries/AP_TECS/AP_TECS.cpp index d74fdcd8264823..5620f861ee495f 100644 --- a/libraries/AP_TECS/AP_TECS.cpp +++ b/libraries/AP_TECS/AP_TECS.cpp @@ -1255,7 +1255,12 @@ void AP_TECS::update_pitch_throttle(int32_t hgt_dem_cm, } else { _THRmaxf = aparm.throttle_max * 0.01f; } - _THRminf = aparm.throttle_min * 0.01f; + // Apply at least trim throttle during the whole takeoff climb. + if (_flight_stage == AP_FixedWing::FlightStage::TAKEOFF ) { + _THRminf = aparm.throttle_cruise * 0.01f; + } else { // Otherwise, during normal situations let regular limit. + _THRminf = aparm.throttle_min * 0.01f; + } // min of 1% throttle range to prevent a numerical error _THRmaxf = MAX(_THRmaxf, _THRminf+0.01);