mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T231, arbitrary radius for elevation plane
This commit is contained in:
@@ -34,7 +34,7 @@ namespace BlackMisc
|
||||
|
||||
bool CElevationPlane::isNull() const
|
||||
{
|
||||
return m_radius.isNull();
|
||||
return m_radius.isNull() || CCoordinateGeodetic::isNull();
|
||||
}
|
||||
|
||||
bool CElevationPlane::isWithinRange(const ICoordinateGeodetic &coordinate) const
|
||||
@@ -46,6 +46,16 @@ namespace BlackMisc
|
||||
return inRange;
|
||||
}
|
||||
|
||||
bool CElevationPlane::isWithinRange(const ICoordinateGeodetic &coordinate, const CLength &radius) const
|
||||
{
|
||||
if (coordinate.isNull()) { return false; }
|
||||
if (radius.isNull()) { return false; }
|
||||
if (isNull()) { return false; }
|
||||
const CLength d = this->calculateGreatCircleDistance(coordinate);
|
||||
const bool inRange = (radius >= d);
|
||||
return inRange;
|
||||
}
|
||||
|
||||
void CElevationPlane::setSinglePointRadius()
|
||||
{
|
||||
m_radius = singlePointRadius();
|
||||
|
||||
Reference in New Issue
Block a user