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)

This commit is contained in:
dakejahl
2018-08-16 18:08:46 -04:00
committed by Daniel Agar
parent 33ac659a10
commit f7147653ab
-5
View File
@@ -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.