|
Enroute Flight Navigation
A navigation app for VFR pilots
|
This extremely simple class holds a few numbers that describe an aircraft. More...
#include <Aircraft.h>
Public Types | |
| enum | FuelConsumptionUnit : quint8 { LiterPerHour = 0 , GallonPerHour = 1 } |
| Units of measurement for volumes. More... | |
| enum | HorizontalDistanceUnit : quint8 { NauticalMile = 0 , Kilometer = 1 , StatuteMile = 2 } |
| Units of measurement for horizontal distances. More... | |
| enum | VerticalDistanceUnit : quint8 { Feet = 0 , Meters = 1 } |
| Units of measurement for vertical distances. More... | |
Public Member Functions | |
| bool | cabinPressureEqualsStaticPressure () const |
| Getter function for property of the same name. | |
| auto | cruiseSpeed () const -> Units::Speed |
| Getter function for property of the same name. | |
| auto | descentSpeed () const -> Units::Speed |
| Getter function for property of the same name. | |
| auto | fuelConsumption () const -> Units::VolumeFlow |
| Getter function for property of the same name. | |
| auto | fuelConsumptionUnit () const -> FuelConsumptionUnit |
| Getter function for property of the same name. | |
| auto | horizontalDistanceUnit () const -> HorizontalDistanceUnit |
| Getter function for property of the same name. | |
| auto | minimumSpeed () const -> Units::Speed |
| Getter function for property of the same name. | |
| auto | name () const -> QString |
| Getter function for property of the same name. | |
| auto | verticalDistanceUnit () const -> VerticalDistanceUnit |
| Getter function for property of the same name. | |
| void | setCabinPressureEqualsStaticPressure (bool newCabinPressureEqualsStaticPressure) |
| Setter function for property of the same name. | |
| void | setCruiseSpeed (Units::Speed newSpeed) |
| Setter function for property of the same name. | |
| void | setDescentSpeed (Units::Speed newSpeed) |
| Setter function for property of the same name. | |
| void | setFuelConsumption (Units::VolumeFlow newFuelConsumption) |
| Setter function for property of the same name. | |
| void | setFuelConsumptionUnit (FuelConsumptionUnit newUnit) |
| Setter function for property of the same name. | |
| void | setHorizontalDistanceUnit (HorizontalDistanceUnit newUnit) |
| Setter function for property of the same name. | |
| void | setMinimumSpeed (Units::Speed newSpeed) |
| Setter function for property of the same name. | |
| void | setName (const QString &newName) |
| Setter function for property of the same name. | |
| void | setVerticalDistanceUnit (VerticalDistanceUnit newUnit) |
| Setter function for property of the same name. | |
| Q_INVOKABLE Navigation::Aircraft | clone () const |
| Return copy of this object. | |
| Q_INVOKABLE QString | describeWay (const QGeoCoordinate &from, const QGeoCoordinate &to) const |
| Description of the way between two points. | |
| Q_INVOKABLE QString | horizontalDistanceToString (Units::Distance distance) const |
| Convert horizontal distance to string. | |
| Q_INVOKABLE QString | horizontalSpeedToString (Units::Speed speed) const |
| Convert horizontal speed to string. | |
| Q_INVOKABLE QString | loadFromJSON (const QString &fileName) |
| Reads aircraft data from a JSON document. | |
| Q_INVOKABLE QString | loadFromJSON (const QByteArray &JSON) |
| Reads aircraft data from a JSON document. | |
| Q_INVOKABLE bool | operator== (const Navigation::Aircraft &other) const |
| Equality check. | |
| Q_INVOKABLE QString | save (const QString &fileName) const |
| Saves aircraft to a file. | |
| Q_INVOKABLE QByteArray | toJSON () const |
| Exports to route to JSON. | |
| Q_INVOKABLE QString | verticalDistanceToString (Units::Distance distance, bool forceSign=false) const |
| Convert vertical distance to string. | |
| Q_INVOKABLE QString | verticalSpeedToString (Units::Speed speed) const |
| Convert vertical speed to string. | |
| Q_INVOKABLE QString | volumeToString (Units::Volume volume) const |
| Convert volume to string. | |
Properties | |
| bool | cabinPressureEqualsStaticPressure |
| Preferred units of measurement for vertical distances. | |
| Units::Speed | cruiseSpeed |
| Cruise Speed. | |
| Units::Speed | descentSpeed |
| Decent Speed. | |
| Units::VolumeFlow | fuelConsumption |
| Fuel Consumption. | |
| FuelConsumptionUnit | fuelConsumptionUnit |
| Preferred units of measurement for fuel consumption. | |
| HorizontalDistanceUnit | horizontalDistanceUnit |
| Preferred units of measurement for horizontal distances. | |
| Units::Speed | maxValidSpeed |
| Maximal speed of the aircraft that is considered valid. | |
| Units::VolumeFlow | maxValidFuelConsumption |
| Maximal fuel consumption that is considered valid. | |
| Units::Speed | minimumSpeed |
| Minimum Speed. | |
| Units::VolumeFlow | minValidFuelConsumption |
| Minimal fuel consumption that is considered valid. | |
| Units::Speed | minValidSpeed |
| Minimal speed of the aircraft that is considered valid. | |
| QString | name |
| Name. | |
| VerticalDistanceUnit | verticalDistanceUnit |
| Preferred units of measurement for vertical distances. | |
This extremely simple class holds a few numbers that describe an aircraft.
Definition at line 35 of file Aircraft.h.
| enum Navigation::Aircraft::FuelConsumptionUnit : quint8 |
Units of measurement for volumes.
| Enumerator | |
|---|---|
| LiterPerHour | Liter per hour. |
| GallonPerHour | Gallon per hour. |
Definition at line 41 of file Aircraft.h.
| enum Navigation::Aircraft::HorizontalDistanceUnit : quint8 |
Units of measurement for horizontal distances.
| Enumerator | |
|---|---|
| NauticalMile | Nautical Mile. |
| Kilometer | Kilometer. |
| StatuteMile | Statute Mile. |
Definition at line 51 of file Aircraft.h.
| enum Navigation::Aircraft::VerticalDistanceUnit : quint8 |
Units of measurement for vertical distances.
| Enumerator | |
|---|---|
| Feet | Feet. |
| Meters | Meters. |
Definition at line 64 of file Aircraft.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 147 of file Aircraft.h.
|
inlinenodiscard |
Return copy of this object.
This is a helper function, used in QML to create explicit copies of this object.
Definition at line 274 of file Aircraft.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 153 of file Aircraft.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 159 of file Aircraft.h.
|
nodiscard |
Description of the way between two points.
| from | Starting point of the way |
| to | Endpoint of the way |
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 165 of file Aircraft.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 171 of file Aircraft.h.
|
nodiscard |
Convert horizontal distance to string.
This method converts a horizontal distance to a localized string, taking horizontalDistanceUnit into account.
| distance | Distance |
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 177 of file Aircraft.h.
|
nodiscard |
Convert horizontal speed to string.
This method converts a horizontal speed to a localized string, taking horizontalDistanceUnit into account.
| speed | Speed |
|
nodiscard |
Reads aircraft data from a JSON document.
This method loads reads data from a JSON document and stores it in the present object. Notifier signals are emitted as appropriate. If this method returns a non-empty string, then the JSON data might be partially read.
| JSON | JSON data |
|
nodiscard |
Reads aircraft data from a JSON document.
This method loads reads data from a JSON document and stores it in the present object. Notifier signals are emitted as appropriate. If this method returns a non-empty string, then the JSON data might be partially read.
| fileName | File name |
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 183 of file Aircraft.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 189 of file Aircraft.h.
| Q_INVOKABLE bool Navigation::Aircraft::operator== | ( | const Navigation::Aircraft & | other | ) | const |
|
nodiscard |
Saves aircraft to a file.
This method saves the aircraft as a JSON file.
| fileName | File name, needs to include path and extension |
|
inline |
Setter function for property of the same name.
| newCabinPressureEqualsStaticPressure | Property cabinPressureEqualsStaticPressure |
Definition at line 206 of file Aircraft.h.
| void Navigation::Aircraft::setCruiseSpeed | ( | Units::Speed | newSpeed | ) |
Setter function for property of the same name.
If newSpeed is outside of the interval [minAircraftSpeed, maxAircraftSpeed], the property will be set to NaN.
| newSpeed | Property cruise speed |
| void Navigation::Aircraft::setDescentSpeed | ( | Units::Speed | newSpeed | ) |
Setter function for property of the same name.
| newSpeed | Descent speed |
| void Navigation::Aircraft::setFuelConsumption | ( | Units::VolumeFlow | newFuelConsumption | ) |
Setter function for property of the same name.
| newFuelConsumption | Fuel consumption |
| void Navigation::Aircraft::setFuelConsumptionUnit | ( | FuelConsumptionUnit | newUnit | ) |
Setter function for property of the same name.
| newUnit | Property preferredFuelConsumptionUnit |
| void Navigation::Aircraft::setHorizontalDistanceUnit | ( | HorizontalDistanceUnit | newUnit | ) |
Setter function for property of the same name.
| newUnit | Property preferredHorizontalDistanceUnit |
| void Navigation::Aircraft::setMinimumSpeed | ( | Units::Speed | newSpeed | ) |
Setter function for property of the same name.
If newSpeed is outside of the interval [minAircraftSpeed, maxAircraftSpeed], the property will be set to NaN.
| newSpeed | Property minimum speed |
| void Navigation::Aircraft::setName | ( | const QString & | newName | ) |
Setter function for property of the same name.
| newName | Property name |
| void Navigation::Aircraft::setVerticalDistanceUnit | ( | VerticalDistanceUnit | newUnit | ) |
Setter function for property of the same name.
| newUnit | Property preferredVerticalDistanceUnit |
|
nodiscard |
Exports to route to JSON.
This method serialises the object as a JSON document.
|
nodiscard |
Convert vertical distance to string.
This method converts a vertical distance to a localized string, taking verticalDistanceUnit into account.
| distance | Distance |
| forceSign | Prepend positive number with a sign "+" |
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 195 of file Aircraft.h.
|
nodiscard |
Convert vertical speed to string.
This method converts a vertical speed to a localized string, taking verticalDistanceUnit into account.
| speed | Speed |
|
nodiscard |
Convert volume to string.
This method converts a volume to a localized string, taking volumeUnit into account.
| volume | Volume |
|
readwrite |
Cruise Speed.
This property holds the cruise speed of the aircraft. This lies in the interval [minAircraftSpeed, maxAircraftSpeed] or if NaN if the cruise speed has not been set.
Definition at line 86 of file Aircraft.h.
|
readwrite |
Decent Speed.
This property holds the descent speed of the aircraft. This is a number that lies in the interval [minAircraftSpeed, maxAircraftSpeed] or NaN if the cruise speed has not been set.
Definition at line 94 of file Aircraft.h.
|
readwrite |
Fuel Consumption.
This property holds the fuel consumption of the aircraft. This is a number that lies in the interval [minFuelConsumption, maxFuelConsumption] or NaN if no value has been set.
Definition at line 102 of file Aircraft.h.
|
readwrite |
Minimum Speed.
This property holds the minimum speed of the aircraft. This lies in the interval [minAircraftSpeed, maxAircraftSpeed] or if NaN if the minimum speed has not been set.
Definition at line 121 of file Aircraft.h.
|
readwrite |