refs #291, member method great circle distance

This commit is contained in:
Klaus Basan
2014-07-02 22:43:56 +02:00
parent e8baa37b9d
commit b1166934e3
3 changed files with 11 additions and 1 deletions

View File

@@ -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;
}

View File

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

View File

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