Handle takeoff waypoints for rover

Fix
This commit is contained in:
Jaeyoung-Lim
2020-11-28 16:18:33 +01:00
committed by Lorenz Meier
parent 1d1fbdb1d3
commit d59ba2032f
+7
View File
@@ -174,6 +174,13 @@ MissionBlock::is_mission_item_reached()
_waypoint_position_reached = true;
}
} else if (_mission_item.nav_cmd == NAV_CMD_TAKEOFF
&& _navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROVER) {
/* for takeoff mission items use the parameter for the takeoff acceptance radius */
if (dist_xy >= 0.0f && dist_xy <= _navigator->get_acceptance_radius()) {
_waypoint_position_reached = true;
}
} else if (_mission_item.nav_cmd == NAV_CMD_TAKEOFF) {
/* for takeoff mission items use the parameter for the takeoff acceptance radius */
if (dist >= 0.0f && dist <= _navigator->get_acceptance_radius()