From e4987f17b9479817b38e439bc957ca9c433f6d3b Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Mon, 8 Apr 2019 15:16:19 +0200 Subject: [PATCH] AC_Fence: use get_distance_NE instead of location_diff --- libraries/AC_Fence/AC_Fence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AC_Fence/AC_Fence.cpp b/libraries/AC_Fence/AC_Fence.cpp index ddcff2fef5..ae59af8ee9 100644 --- a/libraries/AC_Fence/AC_Fence.cpp +++ b/libraries/AC_Fence/AC_Fence.cpp @@ -567,7 +567,7 @@ bool AC_Fence::load_polygon_from_eeprom(bool force_reload) // move into location structure and convert to offset from ekf origin temp_loc.lat = temp_latlon.x; temp_loc.lng = temp_latlon.y; - _boundary[index] = location_diff(ekf_origin, temp_loc) * 100.0f; + _boundary[index] = ekf_origin.get_distance_NE(temp_loc) * 100.0f; } _boundary_num_points = _total; _boundary_loaded = true;