Browse Source

AP_Proximity: move location_update to Location and rename to offset_bearing

mission-4.1.18
Pierre Kancir 6 years ago committed by Peter Barker
parent
commit
72e4e69add
  1. 2
      libraries/AP_Proximity/AP_Proximity_SITL.cpp
  2. 1
      libraries/AP_Proximity/AP_Proximity_SITL.h

2
libraries/AP_Proximity/AP_Proximity_SITL.cpp

@ -107,7 +107,7 @@ bool AP_Proximity_SITL::get_distance_to_fence(float angle_deg, float &distance) @@ -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;

1
libraries/AP_Proximity/AP_Proximity_SITL.h

@ -5,6 +5,7 @@ @@ -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
{

Loading…
Cancel
Save