From e7281aeddc3987f089d305fcfc2936b342f6cd4c Mon Sep 17 00:00:00 2001 From: "Dr.-Ing. Amilcar do Carmo Lucas" Date: Mon, 25 Feb 2019 01:16:20 +0100 Subject: [PATCH] AP_Follow: replace location_offset() and get_distance() function calls with Location object member function calls This allows removing duplicated code --- libraries/AP_Follow/AP_Follow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Follow/AP_Follow.cpp b/libraries/AP_Follow/AP_Follow.cpp index c3bdd917a9..fe68c59656 100644 --- a/libraries/AP_Follow/AP_Follow.cpp +++ b/libraries/AP_Follow/AP_Follow.cpp @@ -152,7 +152,7 @@ bool AP_Follow::get_target_location_and_velocity(Location &loc, Vector3f &vel_ne // project the vehicle position Location last_loc = _target_location; - location_offset(last_loc, vel_ned.x * dt, vel_ned.y * dt); + last_loc.offset(vel_ned.x * dt, vel_ned.y * dt); last_loc.alt -= vel_ned.z * 100.0f * dt; // convert m/s to cm/s, multiply by dt. minus because NED // return latest position estimate