Browse Source

AP_Common: clarify Location::get_distance is horizontal only

apm_2208
Randy Mackay 3 years ago
parent
commit
23ad8b23ac
  1. 2
      libraries/AP_Common/Location.cpp
  2. 2
      libraries/AP_Common/Location.h

2
libraries/AP_Common/Location.cpp

@ -236,7 +236,7 @@ bool Location::get_vector_from_origin_NEU(Vector3f &vec_neu) const @@ -236,7 +236,7 @@ bool Location::get_vector_from_origin_NEU(Vector3f &vec_neu) const
return true;
}
// return distance in meters between two locations
// return horizontal distance in meters between two locations
ftype Location::get_distance(const struct Location &loc2) const
{
ftype dlat = (ftype)(loc2.lat - lat);

2
libraries/AP_Common/Location.h

@ -56,7 +56,7 @@ public: @@ -56,7 +56,7 @@ public:
bool get_vector_xy_from_origin_NE(Vector2f &vec_ne) const WARN_IF_UNUSED;
bool get_vector_from_origin_NEU(Vector3f &vec_neu) const WARN_IF_UNUSED;
// return distance in meters between two locations
// return horizontal distance in meters between two locations
ftype get_distance(const struct Location &loc2) const;
// return the altitude difference in meters taking into account alt frame.

Loading…
Cancel
Save