6 #ifndef SWIFT_MISC_AVIATION_ATCSTATION_H
7 #define SWIFT_MISC_AVIATION_ATCSTATION_H
34 namespace swift::misc::aviation
43 IndexCallsign = CPropertyIndexRef::GlobalIndexCAtcStation,
45 IndexCallsignStringCrossCopuled,
52 IndexIsAfvCrossCoupled,
70 const QDateTime &logoffTimeUtc = QDateTime(),
75 bool hasLogoffTimeUtc()
const;
78 bool hasAtis()
const {
return m_atis.hasMessage(); }
81 bool hasMetar()
const;
93 QString getCallsignAsStringCrossCoupled()
const;
96 QString getCallsignSuffix()
const;
99 int getSuffixSortOrder()
const;
102 void setCallsign(
const CCallsign &callsign);
111 QString getCallsignAndControllerRealName()
const;
123 void setControllerId(
const QString &controllerId) { m_controller.setId(controllerId); }
129 bool hasId()
const {
return m_controller.hasId(); }
153 bool isInRange()
const;
159 bool setOnline(
bool online);
214 virtual QVector3D normalVector()
const override;
217 virtual std::array<double, 3> normalVectorDouble()
const override;
229 QString convertToQString(
bool i18n =
false)
const;
240 bool m_isOnline =
false;
241 bool m_isAfvCrossCoupled =
false;
242 QDateTime m_logoffTimeUtc;
244 CInformationMessage m_metar { CInformationMessage::METAR };
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Altitude as used in aviation, can be AGL or MSL altitude.
Value object encapsulating information about an ATC station.
void setControllerId(const QString &controllerId)
Set controller's id.
void setAfvCrossCoupled(bool coupled)
Set AFV cross coupled.
ColumnIndex
Properties by index.
bool isOnline() const
Is station online?
const CCallsign & getCallsign() const
Get callsign.
bool hasValidFrequency() const
Valid COM frequency.
void setMetar(const CInformationMessage &metar)
Set METAR.
bool hasAtis() const
Has ATIS?
const geo::CCoordinateGeodetic & getPosition() const
Get the position of the center of the controller's area of visibility.
const CInformationMessage & getMetar() const
Get METAR.
QString getCallsignAsString() const
Get callsign as string.
QString getControllerId() const
Get controller name.
void setPosition(const swift::misc::geo::CCoordinateGeodetic &position)
Set position.
void setControllerRealName(const QString &controllerName)
Set controller's name.
bool hasRealName() const
Has valid realname?
QString getControllerRealName() const
Get controller name.
bool hasId() const
Has valid id?
const CInformationMessage & getAtis() const
Get ATIS.
swift::misc::CIcons::IconIndex toIcon() const
As icon, not implemented by all classes.
const physical_quantities::CFrequency & getFrequency() const
Get frequency.
void setAtisMessage(const QString &atis)
Set ATIS Message.
bool isAfvCrossCoupled() const
Is AFV cross coupled?
void setRange(const physical_quantities::CLength &range)
Set range.
const swift::misc::network::CUser & getController() const
Get controller.
const QDateTime & getLogoffTimeUtc() const
Return the expected logoff time (UTC). This data comes from the controller through its ATIS line.
void setMetarMessage(const QString &metar)
Set METAR Message.
const physical_quantities::CLength & getRange() const
Get the radius of the controller's area of visibility.
bool hasCallsign() const
Has callsign?
void setAtis(const CInformationMessage &atis)
Set ATIS.
void setLogoffTimeUtc(const QDateTime &logoffTimeUtc)
Set expected logoff time (UTC)
Value object encapsulating information of a callsign.
static bool isValidCivilAviationFrequency(const physical_quantities::CFrequency &f)
Valid civil aviation frequency?
Interface (actually more an abstract class) of coordinates and relative position to something (normal...
Value object encapsulating information of a user.
Physical unit length (length)
#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 ...