mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T260, utility functions to set provider, plane ctor
This commit is contained in:
committed by
Roland Winklmeier
parent
6e908db52e
commit
056c257182
@@ -34,6 +34,10 @@ namespace BlackMisc
|
||||
m_radius = this->calculateGreatCircleDistance(rangeCoordinate);
|
||||
}
|
||||
|
||||
CElevationPlane::CElevationPlane(const ICoordinateGeodetic &coordinate, const CLength &radius) :
|
||||
CCoordinateGeodetic(coordinate), m_radius(radius)
|
||||
{ }
|
||||
|
||||
const CAltitude &CElevationPlane::getAltitudeIfWithinRadius(const ICoordinateGeodetic &coordinate) const
|
||||
{
|
||||
return (isWithinRange(coordinate)) ? geodeticHeight() : CAltitude::null();
|
||||
|
||||
@@ -36,6 +36,9 @@ namespace BlackMisc
|
||||
//! Plane at given coordinates with range to 2nd coordinate
|
||||
CElevationPlane(const ICoordinateGeodetic &coordinate, const ICoordinateGeodetic &rangeCoordinate);
|
||||
|
||||
//! Plane at given coordinates with radius
|
||||
CElevationPlane(const ICoordinateGeodetic &coordinate, const PhysicalQuantities::CLength &radius);
|
||||
|
||||
//! Constructors from CCoordinateGeodetic
|
||||
using CCoordinateGeodetic::CCoordinateGeodetic;
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace BlackMisc
|
||||
//! \remark use individual names to disambiguate
|
||||
void setProvider(PROVIDER *provider)
|
||||
{
|
||||
if (m_provider == provider) { return; }
|
||||
if (m_provider) { m_lastProviderConnections.disconnectAll(); }
|
||||
m_provider = provider; // new provider
|
||||
IProvider *iProvider = dynamic_cast<IProvider *>(provider);
|
||||
|
||||
Reference in New Issue
Block a user