From f7147653ab90913839d50d30bcd21ca584edda49 Mon Sep 17 00:00:00 2001 From: dakejahl <37091262+dakejahl@users.noreply.github.com> Date: Thu, 16 Aug 2018 18:08:46 -0400 Subject: [PATCH] Navigator RTL: Removed the condition to transition straight to RTL_LAND if the previous setpoint was of type LAND. Not only does this not normally work, as the setpoints are cleared to invalid when navigator changes nav states, but the land lat/lon is set as home.lat and home.lot which is very wrong, as the vehicle would just beeline straight towards thatlocation. (#10252) --- src/modules/navigator/rtl.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/modules/navigator/rtl.cpp b/src/modules/navigator/rtl.cpp index 47208b3aa3..d37ec7efa3 100644 --- a/src/modules/navigator/rtl.cpp +++ b/src/modules/navigator/rtl.cpp @@ -69,11 +69,6 @@ RTL::on_activation() // For safety reasons don't go into RTL if landed. _rtl_state = RTL_STATE_LANDED; - } else if (_navigator->get_position_setpoint_triplet()->current.valid - && _navigator->get_position_setpoint_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND) { - // Skip straight to land if already performing a land. - _rtl_state = RTL_STATE_LAND; - } else if ((rtl_type() == RTL_LAND) && _navigator->on_mission_landing()) { // RTL straight to RETURN state, but mission will takeover for landing.