diff --git a/src/blackmisc/avatcstation.cpp b/src/blackmisc/avatcstation.cpp index e016fb536..eb275d59a 100644 --- a/src/blackmisc/avatcstation.cpp +++ b/src/blackmisc/avatcstation.cpp @@ -258,7 +258,7 @@ namespace BlackMisc */ const CLength &CAtcStation::calculcateDistanceToPlane(const CCoordinateGeodetic &position) { - this->m_distanceToPlane = greatCircleDistance(this->m_position, position); + this->m_distanceToPlane = Geo::greatCircleDistance(this->m_position, position); return this->m_distanceToPlane; } diff --git a/src/blackmisc/coordinategeodetic.cpp b/src/blackmisc/coordinategeodetic.cpp index 529821690..bb353e9a9 100644 --- a/src/blackmisc/coordinategeodetic.cpp +++ b/src/blackmisc/coordinategeodetic.cpp @@ -163,5 +163,13 @@ namespace BlackMisc return CLength(qAbs(dist), CLengthUnit::NM()); } + /* + * Great circle distance + */ + CLength ICoordinateGeodetic::greatCircleDistance(const ICoordinateGeodetic &otherCoordinate) + { + return Geo::greatCircleDistance((*this), otherCoordinate); + } + } // namespace } // namespace diff --git a/src/blackmisc/coordinategeodetic.h b/src/blackmisc/coordinategeodetic.h index 6b00bcdd5..c41184b1d 100644 --- a/src/blackmisc/coordinategeodetic.h +++ b/src/blackmisc/coordinategeodetic.h @@ -42,6 +42,8 @@ namespace BlackMisc return this->longitude().toQString(true); } + //! Great circle distance + BlackMisc::PhysicalQuantities::CLength greatCircleDistance(const ICoordinateGeodetic &otherCoordinate); }; //! Great circle distance between points