mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 14:07:35 +08:00
refs #291, member method great circle distance
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user