AP_Proximity: move location_update to Location and rename to offset_bearing

This commit is contained in:
Pierre Kancir 2019-04-05 08:11:26 +02:00 committed by Peter Barker
parent 12a357ffd7
commit 72e4e69add
2 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,7 @@ bool AP_Proximity_SITL::get_distance_to_fence(float angle_deg, float &distance)
while (max_dist - min_dist > PROXIMITY_ACCURACY) {
float test_dist = (max_dist+min_dist)*0.5f;
Location loc = current_loc;
location_update(loc, angle_deg, test_dist);
loc.offset_bearing(angle_deg, test_dist);
Vector2l vecloc(loc.lat, loc.lng);
if (fence_loader.boundary_breached(vecloc, fence_count->get(), fence)) {
max_dist = test_dist;

View File

@ -5,6 +5,7 @@
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
#include <SITL/SITL.h>
#include <AC_Fence/AC_PolyFence_loader.h>
#include <AP_Common/Location.h>
class AP_Proximity_SITL : public AP_Proximity_Backend
{