From 390e0fa601ab13d2e59c803131cd2a42a12e3a02 Mon Sep 17 00:00:00 2001 From: "Dr.-Ing. Amilcar do Carmo Lucas" Date: Mon, 25 Feb 2019 01:16:24 +0100 Subject: [PATCH] AP_NavEKF3: replace location_offset() and get_distance() function calls with Location object member function calls This allows removing duplicated code --- libraries/AP_NavEKF3/AP_NavEKF3_Outputs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_Outputs.cpp b/libraries/AP_NavEKF3/AP_NavEKF3_Outputs.cpp index f887fb578f..63e9473fa5 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_Outputs.cpp +++ b/libraries/AP_NavEKF3/AP_NavEKF3_Outputs.cpp @@ -325,7 +325,7 @@ bool NavEKF3_core::getLLH(struct Location &loc) const if (filterStatus.flags.horiz_pos_abs || filterStatus.flags.horiz_pos_rel) { loc.lat = EKF_origin.lat; loc.lng = EKF_origin.lng; - location_offset(loc, outputDataNew.position.x, outputDataNew.position.y); + loc.offset(outputDataNew.position.x, outputDataNew.position.y); return true; } else { // we could be in constant position mode because the vehicle has taken off without GPS, or has lost GPS @@ -338,7 +338,7 @@ bool NavEKF3_core::getLLH(struct Location &loc) const return true; } else { // if no GPS fix, provide last known position before entering the mode - location_offset(loc, lastKnownPositionNE.x, lastKnownPositionNE.y); + loc.offset(lastKnownPositionNE.x, lastKnownPositionNE.y); return false; } }