swift
|
Value object encapsulating information about an ATC station. More...
Public Types | |
enum | ColumnIndex { IndexCallsign = CPropertyIndexRef::GlobalIndexCAtcStation , IndexCallsignString , IndexCallsignStringCrossCopuled , IndexController , IndexFrequency , IndexPosition , IndexRange , IndexIsInRange , IndexIsOnline , IndexIsAfvCrossCoupled , IndexLogoffTime , IndexLatitude , IndexLongitude , IndexAtis , IndexMetar } |
Properties by index. | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
![]() | |
enum | ColumnIndex { IndexRelativeDistance = CPropertyIndexRef::GlobalIndexICoordinateWithRelativePosition , IndexRelativeBearing } |
Properties by index. | |
![]() | |
enum | ColumnIndex { IndexLatitude = CPropertyIndexRef::GlobalIndexICoordinateGeodetic , IndexLongitude , IndexLatitudeAsString , IndexLongitudeAsString , IndexGeodeticHeight , IndexGeodeticHeightAsString , IndexNormalVector } |
Properties by index. | |
Public Member Functions | |
CAtcStation () | |
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) | |
virtual geo::CLatitude | latitude () const |
Latitude. More... | |
virtual geo::CLongitude | longitude () const |
Longitude. More... | |
const aviation::CAltitude & | geodeticHeight () const |
Height, ellipsoidal or geodetic height (used in GPS) More... | |
virtual QVector3D | normalVector () const |
Normal vector. More... | |
virtual std::array< double, 3 > | normalVectorDouble () const |
Normal vector with double precision. More... | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const CAtcStation &compareValue) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
swift::misc::CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. More... | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
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. | |
![]() | |
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. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
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. | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
![]() | |
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. | |
![]() | |
CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
Update by variant map. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
Compare for index. | |
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
Is given variant equal to value of property index? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
![]() | |
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. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateWithRelativePosition &compareValue) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
![]() | |
ICoordinateGeodetic ()=default | |
Ctor. | |
virtual | ~ICoordinateGeodetic () |
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. More... | |
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. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateGeodetic &compareValue) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
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 void | registerMetadata () |
Register metadata. | |
![]() | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QJsonObject &json) |
Get object from QJsonObject. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Get object from JSON string. | |
template<class DerivedObj = Derived> | |
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. | |
![]() | |
CValueObject ()=default | |
Default constructor. | |
CValueObject (const CValueObject &)=default | |
Copy constructor. | |
CValueObject & | operator= (const CValueObject &)=default |
Copy assignment operator. | |
~CValueObject ()=default | |
Destructor. | |
CEmpty ()=default | |
Inheriting constructors. | |
CEmpty (const CEmpty &)=default | |
Inheriting constructors. | |
![]() | |
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. | |
![]() | |
ICoordinateWithRelativePosition () | |
Constructor. | |
![]() | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled? | |
![]() | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled? | |
![]() | |
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.
int swift::misc::aviation::CAtcStation::comparePropertyByIndex | ( | CPropertyIndexRef | index, |
const CAtcStation & | compareValue | ||
) | const |
Compare for index.
Definition at line 245 of file atcstation.cpp.
QString swift::misc::aviation::CAtcStation::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 78 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 173 of file atcstation.cpp.
|
virtual |
Latitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 169 of file atcstation.cpp.
|
virtual |
Longitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 171 of file atcstation.cpp.
|
virtual |
Normal vector.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 175 of file atcstation.cpp.
|
virtual |
Normal vector with double precision.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 177 of file atcstation.cpp.
QVariant swift::misc::aviation::CAtcStation::propertyByIndex | ( | CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 179 of file atcstation.cpp.
void swift::misc::aviation::CAtcStation::setPropertyByIndex | ( | CPropertyIndexRef | index, |
const QVariant & | variant | ||
) |
Set property by index.
Definition at line 207 of file atcstation.cpp.
|
inline |
As icon, not implemented by all classes.
Definition at line 232 of file atcstation.h.