mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 05:23:34 +08:00
[fix] Making altitude acceptance radius equal to infinity
[fix] Adding boat condition for NAV_CMD_TAKEOFF
This commit is contained in:
@@ -206,8 +206,9 @@ MissionBlock::is_mission_item_reached_or_completed()
|
||||
_waypoint_position_reached = true;
|
||||
}
|
||||
|
||||
} else if (_mission_item.nav_cmd == NAV_CMD_TAKEOFF
|
||||
&& _navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROVER) {
|
||||
} else if (_mission_item.nav_cmd == NAV_CMD_TAKEOFF &&
|
||||
(_navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROVER ||
|
||||
_navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_BOAT)) {
|
||||
// Accept takeoff waypoint to be reached if the distance in 2D plane is within acceptance radius
|
||||
if (dist_xy >= 0.0f && dist_xy <= _navigator->get_acceptance_radius()) {
|
||||
_waypoint_position_reached = true;
|
||||
|
||||
@@ -1139,7 +1139,8 @@ float Navigator::get_altitude_acceptance_radius()
|
||||
|
||||
} else if (get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROVER) {
|
||||
return INFINITY;
|
||||
|
||||
} else if (get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_BOAT) {
|
||||
return INFINITY;
|
||||
} else {
|
||||
float alt_acceptance_radius = _param_nav_mc_alt_rad.get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user