From 76e840729772c1a237b23ec208f19a4fba605fbf Mon Sep 17 00:00:00 2001 From: Nick Exton Date: Wed, 15 Feb 2023 15:50:28 +1100 Subject: [PATCH] AP_Common: Add same_loc_as function to Location --- libraries/AP_Common/Location.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_Common/Location.h b/libraries/AP_Common/Location.h index ad1260fdac..122bead689 100644 --- a/libraries/AP_Common/Location.h +++ b/libraries/AP_Common/Location.h @@ -110,6 +110,11 @@ public: // check if altitude matches. bool same_alt_as(const Location &loc2) const; + // check if lat, lng, and alt match. + bool same_loc_as(const Location &loc2) const { + return same_latlon_as(loc2) && same_alt_as(loc2); + } + /* * convert invalid waypoint with useful data. return true if location changed */