AP_Common: Add same_loc_as function to Location

This commit is contained in:
Nick Exton 2023-02-15 15:50:28 +11:00 committed by Andrew Tridgell
parent c445bb5f9e
commit 76e8407297
1 changed files with 5 additions and 0 deletions

View File

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