10 using namespace swift::misc::aviation;
11 using namespace swift::misc::physical_quantities;
13 namespace swift::misc::geo
15 QString CElevationPlane::convertToQString(
bool i18n)
const
17 const QString coordinate = CCoordinateGeodetic::toQString(i18n);
18 return QStringLiteral(
"%1 radius: %2").arg(coordinate, m_radius.valueRoundedWithUnit(2, i18n));
47 Q_ASSERT_X(!std::isnan(altitudeMSLft), Q_FUNC_INFO,
"elv.nan");
90 if (unit.
isNull() || this->getAltitudeUnit().isNull()) {
return; }
113 if (coordinate.
isNull()) {
return false; }
114 if (this->
isNull()) {
return false; }
116 const bool inRange = (m_radius >= d);
122 if (coordinate.
isNull()) {
return false; }
123 if (radius.
isNull()) {
return false; }
124 if (this->
isNull()) {
return false; }
126 const bool inRange = (radius >= d);
138 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
175 static const CLength l(50.0, CLengthUnit::m());
181 static const CLength l(500.0, CLengthUnit::m());
187 static const CLength l(1000.0, CLengthUnit::m());
Non-owning reference to a CPropertyIndex with a subset of its features.
Q_REQUIRED_RESULT CPropertyIndexRef copyFrontRemoved() const
Copy with first element removed.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
Altitude as used in aviation, can be AGL or MSL altitude.
bool isMeanSeaLevel() const
MSL Mean sea level?
CAltitude withOffset(const CLength &offset) const
Altitude with offset.
CAltitude & switchUnit(const physical_quantities::CLengthUnit &newUnit)
Value in switched unit.
int compare(const CAltitude &otherAltitude) const
Return negative, zero, or positive if a is less than, equal to, or greater than b.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
virtual const aviation::CAltitude & geodeticHeight() const
Height, ellipsoidal or geodetic height (used in GPS)
virtual bool isNull() const
Is null?
void setGeodeticHeight(const aviation::CAltitude &height)
Set height (ellipsoidal or geodetic height)
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Plane of same elevation, can be a single point or larger area (e.g. airport)
void setMinorAirportRadius()
Treat as elevation of a small airport.
static const physical_quantities::CLength & singlePointRadius()
Radius for single point.
static const physical_quantities::CLength & majorAirportRadius()
Radius for major airport.
void addAltitudeOffset(const physical_quantities::CLength &offset)
Add offset to altitude.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
void switchAltitudeUnit(const physical_quantities::CLengthUnit &unit)
Switch altitude unit.
const aviation::CAltitude & getAltitude() const
Altitude (synonym for geodetic height)
bool isWithinRange(const ICoordinateGeodetic &coordinate) const
Check if elevation is within radius and can be used.
virtual bool isNull() const
Existing value?
const aviation::CAltitude & getAltitudeIfWithinRadius(const ICoordinateGeodetic &coordinate) const
Altitude when within radius, else null.
const physical_quantities::CLengthUnit & getAltitudeUnit() const
Altitude (synonym for geodetic height) unit.
void setRadiusOrMinimumRadius(const physical_quantities::CLength &radius)
Radius or minimum CElevationPlane::singlePointRadius.
void fixRadius()
Set minimum radius if not having radius.
static const physical_quantities::CLength & minorAirportRadius()
Radius for minor airport.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
double getAltitudeValue(const physical_quantities::CLengthUnit &unit) const
Altitude (synonym for geodetic height)
const physical_quantities::CLength & getRadiusOrMinimumRadius() const
Radius or minimum radius.
CElevationPlane()
Default constructor.
aviation::CAltitude getAltitudeInUnit(const physical_quantities::CLengthUnit &unit) const
Altitude (synonym for geodetic height)
static const CElevationPlane & null()
NULL plane.
void setMajorAirportRadius()
Treat as elevation of a small airport.
int comparePropertyByIndex(CPropertyIndexRef index, const CElevationPlane &elevationPlane) const
Compare for index.
void setSinglePointRadius()
Treat as single point as obtained from simulator.
Geodetic coordinate, a position in 3D space relative to the reference geoid.
physical_quantities::CLength calculateGreatCircleDistance(const ICoordinateGeodetic &otherCoordinate) const
Great circle distance.
ColumnIndex
Properties by index.
virtual bool isNull() const
Is null, means vector x, y, z == 0.
Physical unit length (length)
Specialized class for distance units (meter, foot, nautical miles).
bool isNull() const
Is unit null?
bool isNull() const
Is quantity null?
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
double value(MU unit) const
Value in given unit.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
bool isZeroEpsilonConsidered() const
Quantity value <= epsilon.