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 */