From cb8520427c0d2a84f6be1081bc83b940ed558262 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Fri, 8 Mar 2024 17:54:45 +0100 Subject: [PATCH] rtl direct: fix setting of previous altitude (abs vs rel) Signed-off-by: Silvan Fuhrer --- src/modules/navigator/rtl_direct.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/navigator/rtl_direct.cpp b/src/modules/navigator/rtl_direct.cpp index 4906f6d994..d2936986db 100644 --- a/src/modules/navigator/rtl_direct.cpp +++ b/src/modules/navigator/rtl_direct.cpp @@ -265,7 +265,7 @@ void RtlDirect::set_rtl_item() // location and land location after exiting the loiter circle pos_sp_triplet->previous.lat = _land_approach.lat; pos_sp_triplet->previous.lon = _land_approach.lon; - pos_sp_triplet->previous.alt = _mission_item.altitude; + pos_sp_triplet->previous.alt = get_absolute_altitude_for_item(_mission_item); pos_sp_triplet->previous.valid = true; _rtl_state = RTLState::TRANSITION_TO_MC;