From 0b16d7576f0ca6eee5ffdd24ddcf2f72dc732c27 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Mon, 8 Apr 2019 15:28:51 +0200 Subject: [PATCH] AP_AHRS: use get_distance_NED --- libraries/AP_AHRS/AP_AHRS_NavEKF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index 0d7532d991..9a5a7133fe 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -832,7 +832,7 @@ bool AP_AHRS_NavEKF::get_relative_position_NED_home(Vector3f &vec) const return false; } - const Vector3f offset = location_3d_diff_NED(originLLH, _home); + const Vector3f offset = originLLH.get_distance_NED(_home); vec.x = originNED.x - offset.x; vec.y = originNED.y - offset.y;