From 313ed7fc71703c43ddb1f59bd4178af63295d4b5 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 21 Jan 2022 10:42:40 +1100 Subject: [PATCH] AP_Avoidance: rename AP_AHRS::get_position to get_location --- libraries/AP_Avoidance/AP_Avoidance.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_Avoidance/AP_Avoidance.cpp b/libraries/AP_Avoidance/AP_Avoidance.cpp index 9c6f008c8f..1362e7aaea 100644 --- a/libraries/AP_Avoidance/AP_Avoidance.cpp +++ b/libraries/AP_Avoidance/AP_Avoidance.cpp @@ -457,7 +457,7 @@ void AP_Avoidance::check_for_threats() const AP_AHRS &_ahrs = AP::ahrs(); Location my_loc; - if (!_ahrs.get_position(my_loc)) { + if (!_ahrs.get_location(my_loc)) { // if we don't know our own location we can't determine any threat level return; } @@ -542,7 +542,7 @@ void AP_Avoidance::handle_avoidance_local(AP_Avoidance::Obstacle *threat) action = (MAV_COLLISION_ACTION)_fail_action.get(); Location my_loc; if (action != MAV_COLLISION_ACTION_NONE && _fail_altitude_minimum > 0 && - AP::ahrs().get_position(my_loc) && ((my_loc.alt*0.01f) < _fail_altitude_minimum)) { + AP::ahrs().get_location(my_loc) && ((my_loc.alt*0.01f) < _fail_altitude_minimum)) { // disable avoidance when close to ground, report only action = MAV_COLLISION_ACTION_REPORT; } @@ -617,7 +617,7 @@ bool AP_Avoidance::get_vector_perpendicular(const AP_Avoidance::Obstacle *obstac } Location my_abs_pos; - if (!AP::ahrs().get_position(my_abs_pos)) { + if (!AP::ahrs().get_location(my_abs_pos)) { // we should not get to here! If we don't know our position // we can't know if there are any threats, for starters! return false;