Enroute Flight Navigation
A navigation app for VFR pilots
Weather::TAF Class Reference

TAF forecast. More...

#include <TAF.h>

Public Member Functions

 TAF ()=default
 Default constructor.
 
 TAF (QXmlStreamReader &xml)
 Deserialization constructor.
 
 ~TAF ()=default
 Destructor.
 
 TAF (const TAF &)=default
 Copy constructor.
 
 TAF (TAF &&)=default
 Move constructor.
 
TAFoperator= (const TAF &)=default
 Copy assignment operator.
 
TAFoperator= (TAF &&)=default
 Move assignment operator.
 
bool operator== (const TAF &other) const =default
 Equality check.
 
QGeoCoordinate coordinate () const
 Getter function for property with the same name.
 
QDateTime expiration () const
 Getter function for property with the same name.
 
QString ICAOCode () const
 Getter function for property with the same name.
 
bool isValid () const
 Getter function for property with the same name.
 
QDateTime issueTime () const
 Getter function for property with the same name.
 
QString rawText () const
 Getter function for property with the same name.
 
Q_INVOKABLE QString decodedText (const Navigation::Aircraft &act, const QDateTime &time)
 Decoded TAF text.
 

Properties

QGeoCoordinate coordinate
 Geographical coordinate of the station reporting this TAF.
 
QDateTime expiration
 Expiration time and date.
 
QString ICAOCode
 ICAO code of the station reporting this TAF.
 
bool isValid
 
QDateTime issueTime
 Issue time of this TAF.
 
QString rawText
 Raw TAF text.
 

Friends

QDataStream & operator<< (QDataStream &stream, const TAF &taf)
 Serialization.
 
QDataStream & operator>> (QDataStream &stream, Weather::TAF &taf)
 Deserialization.
 

Detailed Description

TAF forecast.

This class contains the data of a TAF report and provided a few methods to access the data. Instances of this class are provided by the WeatherDataProvider class; there is no way to construct valid instances yourself.

Definition at line 42 of file TAF.h.

Constructor & Destructor Documentation

◆ TAF()

Weather::TAF::TAF ( QXmlStreamReader & xml)
explicit

Deserialization constructor.

This constructor reads a XML stream, as provided by the Aviation Weather Center's Text Data Server, https://www.aviationweather.gov/dataserver

Parameters
xmlXML Stream reader

Member Function Documentation

◆ coordinate()

QGeoCoordinate Weather::TAF::coordinate ( ) const
inlinenodiscard

Getter function for property with the same name.

Returns
Property coordiante

Definition at line 143 of file TAF.h.

◆ decodedText()

Q_INVOKABLE QString Weather::TAF::decodedText ( const Navigation::Aircraft & act,
const QDateTime & time )
inlinenodiscard

Decoded TAF text.

Parameters
actCurrent aircraft, used to determine appropriate units
timeCurrent time, used to describe points in time
Returns
Human-readable, translated rich text.

Definition at line 203 of file TAF.h.

◆ expiration()

QDateTime Weather::TAF::expiration ( ) const
inlinenodiscard

Getter function for property with the same name.

Returns
Property expiration

Definition at line 152 of file TAF.h.

◆ ICAOCode()

QString Weather::TAF::ICAOCode ( ) const
inlinenodiscard

Getter function for property with the same name.

Returns
Property ICAOCode

Definition at line 161 of file TAF.h.

◆ issueTime()

QDateTime Weather::TAF::issueTime ( ) const
inlinenodiscard

Getter function for property with the same name.

Returns
Property observationTime

Definition at line 176 of file TAF.h.

◆ isValid()

bool Weather::TAF::isValid ( ) const
nodiscard

Getter function for property with the same name.

Returns
Property isValid

◆ operator=() [1/2]

TAF & Weather::TAF::operator= ( const TAF & )
default

Copy assignment operator.

Returns
Reference to self

◆ operator=() [2/2]

TAF & Weather::TAF::operator= ( TAF && )
default

Move assignment operator.

Returns
Reference to self

◆ operator==()

bool Weather::TAF::operator== ( const TAF & other) const
default

Equality check.

Parameters
otherOther TAF to compare with
Returns
True on equality

◆ rawText()

QString Weather::TAF::rawText ( ) const
inlinenodiscard

Getter function for property with the same name.

Returns
Property extendedName

Definition at line 185 of file TAF.h.

Friends And Related Symbol Documentation

◆ operator<<

QDataStream & operator<< ( QDataStream & stream,
const TAF & taf )
friend

Serialization.

There are no checks for errors of any kind.

◆ operator>>

QDataStream & operator>> ( QDataStream & stream,
Weather::TAF & taf )
friend

Deserialization.

There are no checks for errors of any kind.

Property Documentation

◆ coordinate

QGeoCoordinate Weather::TAF::coordinate
read

Geographical coordinate of the station reporting this TAF.

If the station coordinate is unknown, the property contains an invalid coordinate.

Definition at line 107 of file TAF.h.

◆ expiration

QDateTime Weather::TAF::expiration
read

Expiration time and date.

A TAF message is supposed to expire once the last forecast period ends.

Definition at line 113 of file TAF.h.

◆ ICAOCode

QString Weather::TAF::ICAOCode
read

ICAO code of the station reporting this TAF.

This is a string such as "LSZB" for Bern/Belp airport. If the station code is unknown, the property contains an empty string.

Definition at line 120 of file TAF.h.

◆ isValid

bool Weather::TAF::isValid
read

Indicates if the class represents a valid TAF report

Definition at line 123 of file TAF.h.

◆ rawText

QString Weather::TAF::rawText
read

Raw TAF text.

This is a string such as "TAF EICK 092100Z 23007KT 9999 FEW038 BKN180 11/08 Q1019 NOSIG=".

Definition at line 132 of file TAF.h.


The documentation for this class was generated from the following file: