diff --git a/msg/position_controller_status.msg b/msg/position_controller_status.msg index 2f77ceefa3..71b402942d 100644 --- a/msg/position_controller_status.msg +++ b/msg/position_controller_status.msg @@ -13,4 +13,4 @@ float32 acceptance_radius # the optimal distance to a waypoint to switch to the float32 yaw_acceptance # NaN if not set -float32 altitude_acceptance_radius # the optimal vertical distance to a waypoint to switch to the next +float32 altitude_acceptance # the optimal vertical distance to a waypoint to switch to the next diff --git a/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp b/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp index 674770321d..f3e8e2033c 100644 --- a/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp +++ b/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp @@ -336,7 +336,7 @@ void FlightTaskAuto::_checkAvoidanceProgress() if (pos_to_target.length() < NAV_ACC_RAD.get() && pos_to_target_z > NAV_MC_ALT_RAD.get()) { // vehicle above or below the target waypoint - pos_control_status.altitude_acceptance_radius = pos_to_target_z + 0.5f; + pos_control_status.altitude_acceptance = pos_to_target_z + 0.5f; } // do not check for waypoints yaw acceptance in navigator diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 510ff57e98..e4707f951e 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -852,8 +852,8 @@ Navigator::get_default_altitude_acceptance_radius() const position_controller_status_s &pos_ctrl_status = _position_controller_status_sub.get(); if ((pos_ctrl_status.timestamp > _pos_sp_triplet.timestamp) - && pos_ctrl_status.altitude_acceptance_radius > alt_acceptance_radius) { - alt_acceptance_radius = pos_ctrl_status.altitude_acceptance_radius; + && pos_ctrl_status.altitude_acceptance > alt_acceptance_radius) { + alt_acceptance_radius = pos_ctrl_status.altitude_acceptance; } return alt_acceptance_radius;