|
|
|
@ -94,6 +94,17 @@ Land::on_activation()
@@ -94,6 +94,17 @@ Land::on_activation()
|
|
|
|
|
void |
|
|
|
|
Land::on_active() |
|
|
|
|
{ |
|
|
|
|
/* for VTOL update landing location during back transition */ |
|
|
|
|
if (_navigator->get_vstatus()->is_vtol && |
|
|
|
|
_navigator->get_vstatus()->in_transition_mode) |
|
|
|
|
{ |
|
|
|
|
struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet(); |
|
|
|
|
pos_sp_triplet->current.lat = _navigator->get_global_position()->lat; |
|
|
|
|
pos_sp_triplet->current.lon = _navigator->get_global_position()->lon; |
|
|
|
|
_navigator->set_position_setpoint_triplet_updated(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (is_mission_item_reached() && !_navigator->get_mission_result()->finished) { |
|
|
|
|
_navigator->get_mission_result()->finished = true; |
|
|
|
|
_navigator->set_mission_result_updated(); |
|
|
|
|