|
swift
|
Value object encapsulating information about an ATC station. More...
#include <atcstation.h>
Public Types | |
| enum | ColumnIndex { IndexCallsign = CPropertyIndexRef::GlobalIndexCAtcStation , IndexCallsignString , IndexCallsignStringCrossCopuled , IndexController , IndexFrequency , IndexPosition , IndexRange , IndexIsInRange , IndexIsOnline , IndexIsAfvCrossCoupled , IndexLogoffTime , IndexLatitude , IndexLongitude , IndexAtis , IndexMetar } |
| Properties by index. More... | |
| Public Types inherited from swift::misc::CValueObject< CAtcStation > | |
| using | base_type |
| Base class. | |
| Public Types inherited from swift::misc::CEmpty | |
| using | base_type = CEmpty |
| Base class is alias of itself. | |
| Public Types inherited from swift::misc::mixin::Index< CAtcStation > | |
| enum | ColumnIndex |
| Base class enums. More... | |
| Public Types inherited from swift::misc::geo::ICoordinateWithRelativePosition | |
| enum | ColumnIndex { IndexRelativeDistance = CPropertyIndexRef::GlobalIndexICoordinateWithRelativePosition , IndexRelativeBearing } |
| Properties by index. More... | |
| Public Types inherited from swift::misc::geo::ICoordinateGeodetic | |
| enum | ColumnIndex { IndexLatitude = CPropertyIndexRef::GlobalIndexICoordinateGeodetic , IndexLongitude , IndexLatitudeAsString , IndexLongitudeAsString , IndexGeodeticHeight , IndexGeodeticHeightAsString , IndexNormalVector } |
| Properties by index. More... | |
Public Member Functions | |
| CAtcStation ()=default | |
| Default constructor. | |
| CAtcStation (const QString &callsign) | |
| Simplified constructor. | |
| CAtcStation (const CCallsign &callsign, const network::CUser &controller, const physical_quantities::CFrequency &frequency, const geo::CCoordinateGeodetic &pos, const physical_quantities::CLength &range, bool isOnline=false, const QDateTime &logoffTimeUtc=QDateTime(), const CInformationMessage &atis=CInformationMessage(CInformationMessage::ATIS), const CInformationMessage &metar=CInformationMessage(CInformationMessage::METAR)) | |
| ATC station constructor. | |
| bool | hasLogoffTimeUtc () const |
| Has expected logoff time? | |
| bool | hasAtis () const |
| Has ATIS? | |
| bool | hasMetar () const |
| Has METAR? | |
| const CCallsign & | getCallsign () const |
| Get callsign. | |
| bool | hasCallsign () const |
| Has callsign? | |
| QString | getCallsignAsString () const |
| Get callsign as string. | |
| QString | getCallsignAsStringCrossCoupled () const |
| Get callsign. | |
| QString | getCallsignSuffix () const |
| Callsign suffix (e.g. TWR). | |
| int | getSuffixSortOrder () const |
| Callsign suffix sort order. | |
| void | setCallsign (const CCallsign &callsign) |
| Set callsign. | |
| const swift::misc::network::CUser & | getController () const |
| Get controller. | |
| QString | getControllerRealName () const |
| Get controller name. | |
| QString | getCallsignAndControllerRealName () const |
| Callsign and controller's name if available. | |
| QString | getControllerId () const |
| Get controller name. | |
| void | setController (const network::CUser &controller) |
| Set controller. | |
| void | setControllerRealName (const QString &controllerName) |
| Set controller's name. | |
| void | setControllerId (const QString &controllerId) |
| Set controller's id. | |
| bool | hasRealName () const |
| Has valid realname? | |
| bool | hasId () const |
| Has valid id? | |
| bool | hasValidFrequency () const |
| Valid COM frequency. | |
| const physical_quantities::CFrequency & | getFrequency () const |
| Get frequency. | |
| void | setFrequency (const swift::misc::physical_quantities::CFrequency &frequency) |
| Set frequency. | |
| const geo::CCoordinateGeodetic & | getPosition () const |
| Get the position of the center of the controller's area of visibility. | |
| void | setPosition (const swift::misc::geo::CCoordinateGeodetic &position) |
| Set position. | |
| const physical_quantities::CLength & | getRange () const |
| Get the radius of the controller's area of visibility. | |
| void | setRange (const physical_quantities::CLength &range) |
| Set range. | |
| bool | isInRange () const |
| In range? If range and distance to own aircraft are not available false. | |
| bool | isOnline () const |
| Is station online? | |
| bool | setOnline (bool online) |
| Set online. | |
| bool | isAfvCrossCoupled () const |
| Is AFV cross coupled? | |
| void | setAfvCrossCoupled (bool coupled) |
| Set AFV cross coupled. | |
| const QDateTime & | getLogoffTimeUtc () const |
| Return the expected logoff time (UTC). This data comes from the controller through its ATIS line. | |
| bool | isComUnitTunedToFrequency (const aviation::CComSystem &comUnit) const |
| Is Com unit tuned to this stations frequency. | |
| bool | isAtcStationFrequency (const physical_quantities::CFrequency &frequency) const |
| Is passed frequency the frequency of this station. | |
| const CInformationMessage & | getAtis () const |
| Get ATIS. | |
| void | setAtis (const CInformationMessage &atis) |
| Set ATIS. | |
| void | setAtisMessage (const QString &atis) |
| Set ATIS Message. | |
| const CInformationMessage & | getMetar () const |
| Get METAR. | |
| const CInformationMessage & | getInformationMessage (CInformationMessage::InformationType type) const |
| Message per type. | |
| void | setMetar (const CInformationMessage &metar) |
| Set METAR. | |
| void | setMetarMessage (const QString &metar) |
| Set METAR Message. | |
| bool | setMessage (const CInformationMessage &message) |
| Set given message. | |
| void | setLogoffTimeUtc (const QDateTime &logoffTimeUtc) |
| Set expected logoff time (UTC). | |
| geo::CLatitude | latitude () const |
| Latitude. | |
| geo::CLongitude | longitude () const |
| Longitude. | |
| const aviation::CAltitude & | geodeticHeight () const |
| Height, ellipsoidal or geodetic height (used in GPS). | |
| QVector3D | normalVector () const |
| Normal vector. | |
| std::array< double, 3 > | normalVectorDouble () const |
| Normal vector with double precision. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CAtcStation &compareValue) const |
| Compare for index. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| swift::misc::CIcons::IconIndex | toIcon () const |
| As icon, not implemented by all classes. | |
| Public Member Functions inherited from swift::misc::mixin::MetaType< CAtcStation > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
| Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CAtcStation > | |
| void | marshallToDbus (QDBusArgument &arg, Tags...) const |
| Marshall without begin/endStructure, for when composed within another object. | |
| void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
| Unmarshall without begin/endStructure, for when composed within another object. | |
| Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CAtcStation > | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. | |
| Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CAtcStation > | |
| QJsonObject | toJson () const |
| Cast to JSON object. | |
| QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
| Convenience function JSON as string. | |
| void | convertFromJson (const QJsonObject &json) |
| Assign from JSON object. | |
| Public Member Functions inherited from swift::misc::mixin::String< CAtcStation > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
| Public Member Functions inherited from swift::misc::mixin::Index< CAtcStation > | |
| CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
| Update by variant map. | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CAtcStation &compareValue) const |
| Compare for index. | |
| bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| Is given variant equal to value of property index? | |
| Public Member Functions inherited from swift::misc::mixin::Icon< CAtcStation > | |
| CIcons::CIcons::StandardIconUnknown16 | toIcon () const |
| As icon, not implemented by all classes. | |
| Public Member Functions inherited from swift::misc::geo::ICoordinateWithRelativePosition | |
| const physical_quantities::CLength & | getRelativeDistance () const |
| Get the distance. | |
| void | setRelativeDistance (const physical_quantities::CLength &distance) |
| Set relative distance. | |
| const physical_quantities::CAngle & | getRelativeBearing () const |
| Get the relative bearing. | |
| void | setRelativeBearing (const physical_quantities::CAngle &angle) |
| Set bearing to own plane. | |
| bool | hasValidRelativeDistance () const |
| Valid distance? | |
| bool | hasValidRelativeBearing () const |
| Valid bearing? | |
| physical_quantities::CLength | calculcateAndUpdateRelativeDistance (const geo::ICoordinateGeodetic &position) |
| Calculcate distance, set it, and return distance. | |
| physical_quantities::CLength | calculcateAndUpdateRelativeDistanceAndBearing (const geo::ICoordinateGeodetic &position) |
| Calculcate distance and bearing to plane, set it, and return distance. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateWithRelativePosition &compareValue) const |
| Compare for index. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| Public Member Functions inherited from swift::misc::geo::ICoordinateGeodetic | |
| ICoordinateGeodetic ()=default | |
| Ctor. | |
| virtual | ~ICoordinateGeodetic ()=default |
| Destructor. | |
| ICoordinateGeodetic (const ICoordinateGeodetic &)=default | |
| Copy constructor. | |
| ICoordinateGeodetic & | operator= (const ICoordinateGeodetic &)=default |
| Copy assignment operator. | |
| bool | equalNormalVectorDouble (const std::array< double, 3 > &otherVector) const |
| Is equal? Epsilon considered. | |
| bool | equalNormalVectorDouble (const ICoordinateGeodetic &otherCoordinate) const |
| Is equal, epsilon considered? | |
| QString | latitudeAsString () const |
| Latitude as string. | |
| QString | longitudeAsString () const |
| Longitude as string. | |
| QString | geodeticHeightAsString () const |
| Height as string. | |
| bool | isGeodeticHeightNull () const |
| Geodetic height null? | |
| bool | hasMSLGeodeticHeight () const |
| Geodetic height not null and aviation::CAltitude::MeanSeaLevel. | |
| virtual bool | isNull () const |
| Is null, means vector x, y, z == 0. | |
| physical_quantities::CLength | calculateGreatCircleDistance (const ICoordinateGeodetic &otherCoordinate) const |
| Great circle distance. | |
| bool | isWithinRange (const ICoordinateGeodetic &otherCoordinate, const physical_quantities::CLength &range) const |
| Object within range? | |
| physical_quantities::CAngle | calculateBearing (const ICoordinateGeodetic &otherCoordinate) const |
| Initial bearing. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateGeodetic &compareValue) const |
| Compare for index. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| bool | isNaNVector () const |
| Check values. | |
| bool | isNaNVectorDouble () const |
| Check values. | |
| bool | isInfVector () const |
| Check values. | |
| bool | isInfVectorDouble () const |
| Check values. | |
| bool | isValidVectorRange () const |
| Check values. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from swift::misc::mixin::MetaType< CAtcStation > | |
| static void | registerMetadata () |
| Register metadata. | |
| Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CAtcStation > | |
| static DerivedObj | fromJson (const QJsonObject &json) |
| Get object from QJsonObject. | |
| static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
| Get object from JSON string. | |
| static bool | isValidVector (const std::array< double, 3 > &v) |
| Check values. | |
| Protected Member Functions inherited from swift::misc::CValueObject< CAtcStation > | |
| CEmpty ()=default | |
| Inheriting constructors. | |
| CEmpty (const CEmpty &)=default | |
| Inheriting constructors. | |
| CValueObject ()=default | |
| Default constructor. | |
| CValueObject & | operator= (const CValueObject &)=default |
| Copy assignment operator. | |
| ~CValueObject ()=default | |
| Destructor. | |
| Protected Member Functions inherited from swift::misc::CEmpty | |
| CEmpty ()=default | |
| Protected default constructor. | |
| CEmpty (const CEmpty &)=default | |
| Protected copy constructor. | |
| CEmpty & | operator= (const CEmpty &)=default |
| Protected copy assignment operator. | |
| ~CEmpty ()=default | |
| Non-virtual protected destructor. | |
| Protected Member Functions inherited from swift::misc::geo::ICoordinateWithRelativePosition | |
| ICoordinateWithRelativePosition ()=default | |
| Constructor. | |
| Static Protected Member Functions inherited from swift::misc::geo::ICoordinateWithRelativePosition | |
| static bool | canHandleIndex (CPropertyIndexRef index) |
| Can given index be handled? | |
| Static Protected Member Functions inherited from swift::misc::geo::ICoordinateGeodetic | |
| static bool | canHandleIndex (CPropertyIndexRef index) |
| Can given index be handled? | |
| Protected Attributes inherited from swift::misc::geo::ICoordinateWithRelativePosition | |
| physical_quantities::CAngle | m_relativeBearing { 0, nullptr } |
| temporary stored value | |
| physical_quantities::CLength | m_relativeDistance { 0, nullptr } |
| temporary stored value | |
Value object encapsulating information about an ATC station.
Definition at line 37 of file atcstation.h.
Properties by index.
Definition at line 41 of file atcstation.h.
| swift::misc::aviation::CAtcStation::CAtcStation | ( | const QString & | callsign | ) |
Simplified constructor.
Definition at line 28 of file atcstation.cpp.
| swift::misc::aviation::CAtcStation::CAtcStation | ( | const CCallsign & | callsign, |
| const network::CUser & | controller, | ||
| const physical_quantities::CFrequency & | frequency, | ||
| const geo::CCoordinateGeodetic & | pos, | ||
| const physical_quantities::CLength & | range, | ||
| bool | isOnline = false, | ||
| const QDateTime & | logoffTimeUtc = QDateTime(), | ||
| const CInformationMessage & | atis = CInformationMessage(CInformationMessage::ATIS), | ||
| const CInformationMessage & | metar = CInformationMessage(CInformationMessage::METAR) ) |
ATC station constructor.
Definition at line 30 of file atcstation.cpp.
| int swift::misc::aviation::CAtcStation::comparePropertyByIndex | ( | CPropertyIndexRef | index, |
| const CAtcStation & | compareValue ) const |
Compare for index.
Definition at line 258 of file atcstation.cpp.
| QString swift::misc::aviation::CAtcStation::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 88 of file atcstation.cpp.
|
virtual |
Height, ellipsoidal or geodetic height (used in GPS).
This is approximately MSL (orthometric) height, aka altitude, aka elevation. The terms "geodetic height", "altitude", and "elevation" are interchangable. "Geodetic height" is the generic, context-free term for the vertical component of a position. This is commonly called "altitude" for objects that can move freely in the vertical component. By a similar convention, "elevation" is commonly used for objects that are fixed to the ground.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 180 of file atcstation.cpp.
|
inline |
Get ATIS.
Definition at line 178 of file atcstation.h.
|
inline |
Get callsign.
Definition at line 84 of file atcstation.h.
| QString swift::misc::aviation::CAtcStation::getCallsignAndControllerRealName | ( | ) | const |
Callsign and controller's name if available.
Definition at line 69 of file atcstation.cpp.
|
inline |
Get callsign as string.
Definition at line 90 of file atcstation.h.
| QString swift::misc::aviation::CAtcStation::getCallsignAsStringCrossCoupled | ( | ) | const |
Get callsign.
Definition at line 49 of file atcstation.cpp.
| QString swift::misc::aviation::CAtcStation::getCallsignSuffix | ( | ) | const |
Callsign suffix (e.g. TWR).
Definition at line 58 of file atcstation.cpp.
|
inline |
Get controller.
Definition at line 105 of file atcstation.h.
|
inline |
Get controller name.
Definition at line 114 of file atcstation.h.
|
inline |
Get controller name.
Definition at line 108 of file atcstation.h.
|
inline |
Get frequency.
Definition at line 135 of file atcstation.h.
| const CInformationMessage & swift::misc::aviation::CAtcStation::getInformationMessage | ( | CInformationMessage::InformationType | type | ) | const |
Message per type.
Definition at line 154 of file atcstation.cpp.
|
inline |
Return the expected logoff time (UTC). This data comes from the controller through its ATIS line.
Definition at line 169 of file atcstation.h.
|
inline |
Get METAR.
Definition at line 187 of file atcstation.h.
|
inline |
Get the position of the center of the controller's area of visibility.
Definition at line 141 of file atcstation.h.
|
inline |
Get the radius of the controller's area of visibility.
Definition at line 147 of file atcstation.h.
| int swift::misc::aviation::CAtcStation::getSuffixSortOrder | ( | ) | const |
Callsign suffix sort order.
Definition at line 60 of file atcstation.cpp.
|
inline |
Has ATIS?
Definition at line 78 of file atcstation.h.
|
inline |
Has callsign?
Definition at line 87 of file atcstation.h.
|
inline |
Has valid id?
Definition at line 129 of file atcstation.h.
| bool swift::misc::aviation::CAtcStation::hasLogoffTimeUtc | ( | ) | const |
Has expected logoff time?
Definition at line 45 of file atcstation.cpp.
| bool swift::misc::aviation::CAtcStation::hasMetar | ( | ) | const |
Has METAR?
Definition at line 47 of file atcstation.cpp.
|
inline |
Has valid realname?
Definition at line 126 of file atcstation.h.
|
inline |
Valid COM frequency.
Definition at line 132 of file atcstation.h.
|
inline |
Is AFV cross coupled?
Definition at line 162 of file atcstation.h.
| bool swift::misc::aviation::CAtcStation::isAtcStationFrequency | ( | const physical_quantities::CFrequency & | frequency | ) | const |
Is passed frequency the frequency of this station.
Definition at line 149 of file atcstation.cpp.
| bool swift::misc::aviation::CAtcStation::isComUnitTunedToFrequency | ( | const aviation::CComSystem & | comUnit | ) | const |
Is Com unit tuned to this stations frequency.
Definition at line 144 of file atcstation.cpp.
| bool swift::misc::aviation::CAtcStation::isInRange | ( | ) | const |
In range? If range and distance to own aircraft are not available false.
Definition at line 125 of file atcstation.cpp.
|
inline |
Is station online?
Definition at line 156 of file atcstation.h.
|
virtual |
Latitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 176 of file atcstation.cpp.
|
virtual |
Longitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 178 of file atcstation.cpp.
|
virtual |
Normal vector.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 182 of file atcstation.cpp.
|
virtual |
Normal vector with double precision.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 184 of file atcstation.cpp.
| QVariant swift::misc::aviation::CAtcStation::propertyByIndex | ( | CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 186 of file atcstation.cpp.
|
inline |
Set AFV cross coupled.
Definition at line 165 of file atcstation.h.
|
inline |
Set ATIS.
Definition at line 181 of file atcstation.h.
|
inline |
Set ATIS Message.
Definition at line 184 of file atcstation.h.
| void swift::misc::aviation::CAtcStation::setCallsign | ( | const CCallsign & | callsign | ) |
Set callsign.
Definition at line 62 of file atcstation.cpp.
| void swift::misc::aviation::CAtcStation::setController | ( | const network::CUser & | controller | ) |
Set controller.
Definition at line 82 of file atcstation.cpp.
|
inline |
Set controller's id.
Definition at line 123 of file atcstation.h.
|
inline |
Set controller's name.
Definition at line 120 of file atcstation.h.
| void swift::misc::aviation::CAtcStation::setFrequency | ( | const swift::misc::physical_quantities::CFrequency & | frequency | ) |
Set frequency.
Definition at line 119 of file atcstation.cpp.
|
inline |
Set expected logoff time (UTC).
Definition at line 202 of file atcstation.h.
| bool swift::misc::aviation::CAtcStation::setMessage | ( | const CInformationMessage & | message | ) |
Set given message.
Definition at line 165 of file atcstation.cpp.
|
inline |
Set METAR.
Definition at line 193 of file atcstation.h.
|
inline |
Set METAR Message.
Definition at line 196 of file atcstation.h.
| bool swift::misc::aviation::CAtcStation::setOnline | ( | bool | online | ) |
Set online.
Definition at line 134 of file atcstation.cpp.
|
inline |
Set position.
Definition at line 144 of file atcstation.h.
| void swift::misc::aviation::CAtcStation::setPropertyByIndex | ( | CPropertyIndexRef | index, |
| const QVariant & | variant ) |
Set property by index.
Definition at line 217 of file atcstation.cpp.
|
inline |
Set range.
Definition at line 150 of file atcstation.h.
|
inline |
As icon, not implemented by all classes.
Definition at line 232 of file atcstation.h.