From 3c1957998823c0cb4980a8d2055ba6184f727b2b Mon Sep 17 00:00:00 2001 From: Stavros Korokithakis Date: Sun, 28 Mar 2021 23:29:47 +0300 Subject: [PATCH] Plane: Push the TECS to climb in all circumstances --- ArduPlane/ArduPlane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index 5f0acc6ad5..ae4ea0eadf 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -507,7 +507,7 @@ void Plane::update_alt() // ensure we do the initial climb in RTL. We add an extra // 10m in the demanded height to push TECS to climb // quickly - target_alt = MAX(target_alt, prev_WP_loc.alt + (g2.rtl_climb_min+10)*100); + target_alt = MAX(target_alt, prev_WP_loc.alt - home.alt) + (g2.rtl_climb_min+10)*100; } SpdHgt_Controller->update_pitch_throttle(target_alt,