AC_Fence: use get_distance_NE instead of location_diff

This commit is contained in:
Pierre Kancir 2019-04-08 15:16:19 +02:00 committed by Tom Pittenger
parent 3f5a6a243c
commit e4987f17b9

View File

@ -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;