Enroute Flight Navigation
A navigation app for VFR pilots
GeoMaps::Airspace Class Reference

A very simple class that describes an airspace. More...

#include <Airspace.h>

Public Member Functions

 Airspace ()=default
 Constructs an invalid airspace.
 Airspace (const QJsonObject &geoJSONObject)
 Constructs an airspace from a GeoJSON object.
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.
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.
auto isValid () const -> bool
 Getter function for property with the same name.
auto lowerBound () const -> QString
 Getter function for property with the same name.
auto lowerBoundMetric () const -> QString
 Getter function for property with the same name.
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 CAT () const -> QString
 Getter function for property with the same name.
auto upperBound () const -> QString
 Getter function for property with the same name.
auto upperBoundMetric () const -> QString
 Getter function for property with the same name.

Properties

bool isValid
 Validity.
QString lowerBound
 Lower limit of the airspace.
QString lowerBoundMetric
 Lower limit of the airspace.
QGeoPolygon polygon
 QGeoPolygon that describes the lateral limits of the airspace.
QString upperBound
 Upper limit of the airspace.
QString upperBoundMetric
 Upper limit of the airspace.

Friends

auto operator== (const GeoMaps::Airspace &, const GeoMaps::Airspace &) -> bool
 Comparison.

Detailed Description

A very simple class that describes an airspace.

Definition at line 33 of file Airspace.h.

Constructor & Destructor Documentation

◆ Airspace()

GeoMaps::Airspace::Airspace ( const QJsonObject & geoJSONObject)
explicit

Constructs an airspace from a GeoJSON object.

This method constructs an Airpace from a GeoJSON description. The GeoJSON file specification is found here.

Parameters
geoJSONObjectGeoJSON Object that describes the airspace.

Member Function Documentation

◆ CAT()

auto GeoMaps::Airspace::CAT ( ) const -> QString
inlinenodiscard

Getter function for property with the same name.

Returns
Property CAT

Definition at line 194 of file Airspace.h.

◆ estimatedLowerBoundMSL()

Units::Distance GeoMaps::Airspace::estimatedLowerBoundMSL ( Units::Distance terrainElevation,
Units::Pressure QNH,
Units::Distance ownshipGeometricAltitude,
Units::Distance ownshipBarometricAltitude ) const
nodiscard

Estimates the lower limit of the airspace, as a geometric altitude above MSL.

This method estimates the lower limit of the airspace at a given point, as a geometric altitude above MSL. Since many airspace boundaries are defined as barometric altitudes (above standard or QNH pressure level), the method needs to know QNH and the ownship geometric and barometric altitude in order to provide an estimate that is good enough to judge vertical distances to airspaces.

In cases where no precision is required, you can set ownshipGeometricAltitude and ownshipBarometricAltitude to Units::Distance::fromFT(0). Depending on weather, this will lead to an error of about 5-10%, but we have seen days when the error was larger than 15%.

Parameters
terrainElevationElevation of the terrain at the given point. This is used when the airspace limit is defined AGL.
QNHThis datum is used when the airspace limit is defined as above QNH.
ownshipGeometricAltitudeGeometric altitude of the own aircraft. This datum is used when the airspace limit is defined as a flight level or above QNH, to ensure that the estimate is precise for airspaces limits close to the ownship.
ownshipBarometricAltitudeBarometric altitude of the own aircraft. This datum is used when the airspace limit is defined as a flight level or above QNH, to ensure that the estimate is precise for airspaces limits close to the ownship.
Returns
Estimated lower bound of the airspace, as a geometric altitude above MSL. If no meaningful bound can be computed, a default-constructed distance is returned.

◆ estimatedUpperBoundMSL()

Units::Distance GeoMaps::Airspace::estimatedUpperBoundMSL ( Units::Distance terrainElevation,
Units::Pressure QNH,
Units::Distance ownshipGeometricAltitude,
Units::Distance ownshipBarometricAltitude ) const
nodiscard

Estimates the upper limit of the airspace, as a geometric altitude above MSL.

This method estimates the upper limit of the airspace at a given point, as a geometric altitude above MSL. Since many airspace boundaries are defined as barometric altitudes (above standard or QNH pressure level), the method needs to know QNH and the ownship geometric and barometric altitude in order to provide an estimate that is good enough to judge vertical distances to airspaces.

In cases where no precision is required, you can set ownshipGeometricAltitude and ownshipBarometricAltitude to Units::Distance::fromFT(0). Depending on weather, this will lead to an error of about 5-10%, but we have seen days when the error was larger than 15%.

Parameters
terrainElevationElevation of the terrain at the given point. This is used when the airspace limit is defined AGL.
QNHThis datum is used when the airspace limit is defined as above QNH.
ownshipGeometricAltitudeGeometric altitude of the own aircraft. This datum is used when the airspace limit is defined as a flight level or above QNH, to ensure that the estimate is precise for airspaces limits close to the ownship.
ownshipBarometricAltitudeBarometric altitude of the own aircraft. This datum is used when the airspace limit is defined as a flight level or above QNH, to ensure that the estimate is precise for airspaces limits close to the ownship.
Returns
Estimated lower bound of the airspace, as a geometric altitude above MSL. If no meaningful bound can be computed, a default-constructed distance is returned.

◆ isValid()

auto GeoMaps::Airspace::isValid ( ) const -> bool
inlinenodiscard

Getter function for property with the same name.

Returns
Property isValid

Definition at line 136 of file Airspace.h.

◆ lowerBound()

auto GeoMaps::Airspace::lowerBound ( ) const -> QString
inlinenodiscard

Getter function for property with the same name.

Returns
Property lowerBound

Definition at line 150 of file Airspace.h.

◆ lowerBoundMetric()

auto GeoMaps::Airspace::lowerBoundMetric ( ) const -> QString
inlinenodiscard

Getter function for property with the same name.

Returns
Property lowerBoundMetric

Definition at line 162 of file Airspace.h.

◆ name()

auto GeoMaps::Airspace::name ( ) const -> QString
inlinenodiscard

Getter function for property with the same name.

Returns
Property name

Definition at line 171 of file Airspace.h.

◆ polygon()

auto GeoMaps::Airspace::polygon ( ) const -> QGeoPolygon
inlinenodiscard

Getter function for property with the same name.

Returns
Property polygon

Definition at line 180 of file Airspace.h.

◆ upperBound()

auto GeoMaps::Airspace::upperBound ( ) const -> QString
inlinenodiscard

Getter function for property with the same name.

Returns
Property upperBound

Definition at line 206 of file Airspace.h.

◆ upperBoundMetric()

auto GeoMaps::Airspace::upperBoundMetric ( ) const -> QString
inlinenodiscard

Getter function for property with the same name.

Returns
Property upperBoundMetric

Definition at line 218 of file Airspace.h.

Property Documentation

◆ lowerBound

QString GeoMaps::Airspace::lowerBound
read

Lower limit of the airspace.

A string that describes the lower bound of the airspace

See also
upperBound

Definition at line 144 of file Airspace.h.

◆ lowerBoundMetric

QString GeoMaps::Airspace::lowerBoundMetric
read

Lower limit of the airspace.

A string that describes the lower bound of the airspace in metric terms

Definition at line 156 of file Airspace.h.

◆ upperBound

QString GeoMaps::Airspace::upperBound
read

Upper limit of the airspace.

A string that describes the upper bound of the airspace

Definition at line 200 of file Airspace.h.

◆ upperBoundMetric

QString GeoMaps::Airspace::upperBoundMetric
read

Upper limit of the airspace.

A string that describes the upper bound of the airspace in metric terms

Definition at line 212 of file Airspace.h.


The documentation for this class was generated from the following file: