26#include "units/Distance.h"
27#include "units/Pressure.h"
51 explicit Airspace(
const QJsonObject &geoJSONObject);
136 [[nodiscard]]
auto isValid() const ->
bool {
return !m_polygon.isEmpty(); }
150 [[nodiscard]]
auto lowerBound() const -> QString {
return m_lowerBound; }
162 [[nodiscard]]
auto lowerBoundMetric() const -> QString {
return makeMetric(m_lowerBound); }
165 Q_PROPERTY(QString
name READ
name CONSTANT)
171 [[nodiscard]]
auto name() const -> QString {
return m_name; }
180 [[nodiscard]]
auto polygon() const -> QGeoPolygon {
return m_polygon; }
188 Q_PROPERTY(QString
CAT READ
CAT CONSTANT)
194 [[nodiscard]]
auto CAT() const -> QString {
return m_CAT; }
206 [[nodiscard]]
auto upperBound() const -> QString {
return m_upperBound; }
218 [[nodiscard]]
auto upperBoundMetric() const -> QString {
return makeMetric(m_upperBound); }
224 [[nodiscard]]
static auto makeMetric(
const QString& standard) -> QString;
231 QString m_upperBound;
232 QString m_lowerBound;
233 QGeoPolygon m_polygon;
A very simple class that describes an airspace.
auto CAT() const -> QString
Getter function for property with the same name.
QString upperBoundMetric
Upper limit of the airspace.
auto lowerBound() const -> QString
Getter function for property with the same name.
auto lowerBoundMetric() const -> QString
Getter function for property with the same name.
Units::Distance estimatedLowerBoundMSL(Units::Distance terrainElevation, Units::Pressure QNH, Units::Distance ownshipGeometricAltitude, Units::Distance ownshipBarometricAltitude) const
Estimates the lower limit of the airspace, as a geometric altitude above MSL.
QString lowerBoundMetric
Lower limit of the airspace.
auto name() const -> QString
Getter function for property with the same name.
auto polygon() const -> QGeoPolygon
Getter function for property with the same name.
auto isValid() const -> bool
Getter function for property with the same name.
friend auto operator==(const GeoMaps::Airspace &, const GeoMaps::Airspace &) -> bool
Comparison.
QGeoPolygon polygon
QGeoPolygon that describes the lateral limits of the airspace.
QString upperBound
Upper limit of the airspace.
Units::Distance estimatedUpperBoundMSL(Units::Distance terrainElevation, Units::Pressure QNH, Units::Distance ownshipGeometricAltitude, Units::Distance ownshipBarometricAltitude) const
Estimates the upper limit of the airspace, as a geometric altitude above MSL.
QString lowerBound
Lower limit of the airspace.
Airspace()=default
Constructs an invalid airspace.
auto upperBound() const -> QString
Getter function for property with the same name.
auto upperBoundMetric() const -> QString
Getter function for property with the same name.
Airspace(const QJsonObject &geoJSONObject)
Constructs an airspace from a GeoJSON object.
Convenience class for distance computations.
Convenience class for pressure computations.