Skip to content

Commit

Permalink
Navigator RTL: Removed the condition to transition straight to RTL_LA…
Browse files Browse the repository at this point in the history
…ND 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)
  • Loading branch information
dakejahl authored and dagar committed Aug 16, 2018
1 parent 33ac659 commit f714765
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/modules/navigator/rtl.cpp
Expand Up @@ -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.

Expand Down

0 comments on commit f714765

Please sign in to comment.