6 #ifndef SWIFT_MISC_AVIATION_AIRPORT_H
7 #define SWIFT_MISC_AVIATION_AIRPORT_H
29 namespace swift::misc::aviation
41 IndexIcao = swift::misc::CPropertyIndexRef::GlobalIndexCAirport,
61 const QString &descriptiveName);
76 QString getLocationPlusOptionalName()
const;
79 void setLocation(
const QString &location) { this->m_location = location; }
82 bool matchesLocation(
const QString &location)
const;
91 bool matchesDescriptiveName(
const QString &name)
const;
113 this->m_position.setGeodeticHeight(elevation);
123 void updateMissingParts(
const CAirport &airport);
128 return this->m_position.geodeticHeight();
135 virtual bool isNull()
const override;
144 virtual QVector3D
normalVector()
const override {
return this->getPosition().normalVector(); }
149 return this->getPosition().normalVectorDouble();
162 QString convertToQString(
bool i18n =
false)
const;
165 static CAirport fromDatabaseJson(
const QJsonObject &json,
const QString &prefix = QString());
169 QString m_descriptiveName;
170 bool m_operating =
true;
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Value object encapsulating information about an airpot.
virtual std::array< double, 3 > normalVectorDouble() const
Normal vector with double precision.
void setPosition(const swift::misc::geo::CCoordinateGeodetic &position)
Set position.
const swift::misc::aviation::CAltitude & geodeticHeight() const
Height, ellipsoidal or geodetic height (used in GPS)
void setElevation(const swift::misc::aviation::CAltitude &elevation)
Elevation.
virtual swift::misc::geo::CLongitude longitude() const
Longitude.
void setLocation(const QString &location)
Set location.
virtual QVector3D normalVector() const
Normal vector.
void setIcao(const CAirportIcaoCode &icao)
Set ICAO code.
const QString & getLocation() const
Get location (e.g. "London")
void setDescriptiveName(const QString &name)
Set descriptive name.
CAirport()=default
Default constructor.
const CCountry & getCountry() const
Get the country.
void setOperating(bool operating)
Sets the value of.
bool hasValidIcaoCode() const
Valid ICAO code.
const swift::misc::aviation::CAltitude & getElevation() const
Elevation.
const swift::misc::geo::CCoordinateGeodetic & getPosition() const
Get the position.
const QString & getDescriptiveName() const
Get descriptive name.
const CAirportIcaoCode & getIcao() const
Get ICAO code.
const QString & getIcaoAsString() const
Get ICAO code as string.
virtual swift::misc::geo::CLatitude latitude() const
Latitude.
ColumnIndex
Properties by index.
bool isOperating() const
Is the airport still active?
void setCountry(const CCountry &country)
Set the country.
Value object encapsulating information of airport ICAO data.
Altitude as used in aviation, can be AGL or MSL altitude.
Class from which a derived class can inherit datastore-related functions.
Interface (actually more an abstract class) of coordinates and relative position to something (normal...
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...