11 #include <QTextStream>
33 using namespace swift::misc::aviation;
34 using namespace swift::misc::physical_quantities;
35 using namespace swift::misc::geo;
36 using namespace swift::misc::network;
39 namespace swift::sample
41 int CSamplesAviation::samples(QTextStream &out)
46 out << h1 << Qt::endl;
47 out << h1 <<
" " << h2 <<
" " << (h1 == h2) <<
" " << (h1 != h2) <<
" " << (h1 == h1) << Qt::endl;
51 out << c1 << Qt::endl;
53 out << c1 << Qt::endl;
57 out << nav1 << Qt::endl;
62 out << tr1 <<
" " << tr2 << Qt::endl;
67 out << callsign1 <<
" " << callsign2 <<
" " << (callsign1 == callsign2) << Qt::endl;
69 CAtcStation station1 = CTestData::getFrankfurtTower();
74 out << station1 <<
" " << station2 <<
" " << (station1.getCallsign() == station2.
getCallsign()) << Qt::endl;
77 CUser user(
"12345",
"Joe KING KGLC");
78 out << user.getRealName() << user.getHomeBase() << Qt::endl;
82 atcList.
push_back(CTestData::getAtcStations());
86 out << atcList << Qt::endl;
87 out <<
"-----------------------------------------------" << Qt::endl;
94 out << alt <<
" " << altMsl << Qt::endl;
96 out << frankfurt << Qt::endl;
97 out <<
"-----------------------------------------------" << Qt::endl;
CSequence sortedBy(K1 key1, Keys... keys) const
Return a copy sorted by some particular key(s).
CSequence findBy(Predicate p) const
Return a copy containing only those elements for which a given predicate returns true.
void push_back(const T &value)
Appends an element at the end of the sequence.
Value object encapsulating information of airport ICAO data.
Altitude as used in aviation, can be AGL or MSL altitude.
bool toMeanSeaLevel()
Flightlevel to MSL.
Value object encapsulating information about an ATC station.
void setController(const network::CUser &controller)
Set controller.
const CCallsign & getCallsign() const
Get callsign.
QString getControllerRealName() const
Get controller name.
const physical_quantities::CFrequency & getFrequency() const
Get frequency.
Value object for a list of ATC stations.
Value object encapsulating information of a callsign.
static CComSystem getCom1System(double activeFrequencyMHz, double standbyFrequencyMHz=-1)
COM1 unit.
Heading as used in aviation, can be true or magnetic heading.
NAV system (radio navigation)
static CNavSystem getNav1System(double activeFrequencyMHz, double standbyFrequencyMHz=-1)
NAV1 unit.
@ StateStandby
not a real mode, more a state
Value object encapsulating information of a user.
Generate data for testing purposes.
Free functions in swift::misc.