swift
src
core
fsd
flightplan.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6
#ifndef SWIFT_CORE_FSD_FLIGHTPLAN_H
7
#define SWIFT_CORE_FSD_FLIGHTPLAN_H
8
9
#include "
core/fsd/enums.h
"
10
#include "
core/fsd/messagebase.h
"
11
12
namespace
swift::core::fsd
13
{
15
class
SWIFT_CORE_EXPORT
FlightPlan
:
public
MessageBase
16
{
17
public
:
19
FlightPlan
(
const
QString &sender,
const
QString &receiver,
FlightType
flightType,
20
const
QString &aircraftIcaoType,
int
trueCruisingSpeed,
const
QString &depAirport,
21
int
estimatedDepTime,
int
actualDepTime,
const
QString &cruiseAlt,
const
QString &destAirport,
22
int
hoursEnroute,
int
minutesEnroute,
int
fuelAvailHours,
int
fuelAvailMinutes,
23
const
QString &altAirport,
const
QString &remarks,
const
QString &route);
24
26
QStringList toTokens()
const
;
27
29
static
FlightPlan
fromTokens(
const
QStringList &tokens);
30
32
static
QString
pdu
() {
return
"$FP"
; }
33
36
FlightType
m_flightType {};
37
QString
38
m_aircraftIcaoType
;
39
int
m_trueCruisingSpeed = 0;
40
QString
m_depAirport
;
41
int
m_estimatedDepTime = 0;
42
int
m_actualDepTime = 0;
43
QString
m_cruiseAlt
;
44
QString
m_destAirport
;
45
int
m_hoursEnroute = 0;
46
int
m_minutesEnroute = 0;
47
int
m_fuelAvailHours = 0;
48
int
m_fuelAvailMinutes = 0;
49
QString
m_altAirport
;
50
QString
m_remarks
;
51
QString
m_route
;
53
54
protected
:
55
FlightPlan
();
56
};
57
59
inline
bool
operator==(
const
FlightPlan
&lhs,
const
FlightPlan
&rhs)
60
{
61
return
lhs.
sender
() == rhs.
sender
() && lhs.
receiver
() == rhs.
receiver
() &&
62
lhs.
m_flightType
== rhs.
m_flightType
&& lhs.
m_aircraftIcaoType
== rhs.
m_aircraftIcaoType
&&
63
lhs.
m_trueCruisingSpeed
== rhs.
m_trueCruisingSpeed
&& lhs.
m_depAirport
== rhs.
m_depAirport
&&
64
lhs.
m_estimatedDepTime
== rhs.
m_estimatedDepTime
&& lhs.
m_actualDepTime
== rhs.
m_actualDepTime
&&
65
lhs.
m_cruiseAlt
== rhs.
m_cruiseAlt
&& lhs.
m_destAirport
== rhs.
m_destAirport
&&
66
lhs.
m_hoursEnroute
== rhs.
m_hoursEnroute
&& lhs.
m_minutesEnroute
== rhs.
m_minutesEnroute
&&
67
lhs.
m_fuelAvailHours
== rhs.
m_fuelAvailHours
&& lhs.
m_fuelAvailMinutes
== rhs.
m_fuelAvailMinutes
&&
68
lhs.
m_altAirport
== rhs.
m_altAirport
&& lhs.
m_remarks
== rhs.
m_remarks
&& lhs.
m_route
== rhs.
m_route
;
69
}
70
72
inline
bool
operator!=
(
const
FlightPlan
&lhs,
const
FlightPlan
&rhs) {
return
!(lhs == rhs); }
73
}
// namespace swift::core::fsd
74
75
#endif
// SWIFT_CORE_FSD_FLIGHTPLAN_H
swift::core::fsd::operator!=
bool operator!=(const AddAtc &lhs, const AddAtc &rhs)
Not equal operator.
Definition:
addatc.h:68
swift::core::fsd::FlightPlan
FSD Message: flightplan.
Definition:
flightplan.h:16
swift::core::fsd::FlightPlan::m_aircraftIcaoType
QString m_aircraftIcaoType
Contains the full equipment string in FAA or ICAO format, depending on the server.
Definition:
flightplan.h:38
swift::core::fsd::FlightPlan::m_fuelAvailMinutes
int m_fuelAvailMinutes
Properties.
Definition:
flightplan.h:48
swift::core::fsd::FlightPlan::pdu
static QString pdu()
PDU identifier.
Definition:
flightplan.h:32
swift::core::fsd::FlightPlan::m_actualDepTime
int m_actualDepTime
Properties.
Definition:
flightplan.h:42
swift::core::fsd::FlightPlan::m_remarks
QString m_remarks
Properties.
Definition:
flightplan.h:50
swift::core::fsd::FlightPlan::m_trueCruisingSpeed
int m_trueCruisingSpeed
Properties.
Definition:
flightplan.h:39
swift::core::fsd::FlightPlan::m_depAirport
QString m_depAirport
Properties.
Definition:
flightplan.h:40
swift::core::fsd::FlightPlan::m_flightType
FlightType m_flightType
Properties.
Definition:
flightplan.h:36
swift::core::fsd::FlightPlan::m_route
QString m_route
Properties.
Definition:
flightplan.h:51
swift::core::fsd::FlightPlan::m_cruiseAlt
QString m_cruiseAlt
Properties.
Definition:
flightplan.h:43
swift::core::fsd::FlightPlan::m_minutesEnroute
int m_minutesEnroute
Properties.
Definition:
flightplan.h:46
swift::core::fsd::FlightPlan::m_hoursEnroute
int m_hoursEnroute
Properties.
Definition:
flightplan.h:45
swift::core::fsd::FlightPlan::m_destAirport
QString m_destAirport
Properties.
Definition:
flightplan.h:44
swift::core::fsd::FlightPlan::m_estimatedDepTime
int m_estimatedDepTime
Properties.
Definition:
flightplan.h:41
swift::core::fsd::FlightPlan::m_altAirport
QString m_altAirport
Properties.
Definition:
flightplan.h:49
swift::core::fsd::FlightPlan::m_fuelAvailHours
int m_fuelAvailHours
Properties.
Definition:
flightplan.h:47
swift::core::fsd::MessageBase
FSD message base class.
Definition:
messagebase.h:58
swift::core::fsd::MessageBase::sender
QString sender() const
get message sender
Definition:
messagebase.h:73
swift::core::fsd::MessageBase::receiver
QString receiver() const
Get message receiver.
Definition:
messagebase.h:79
enums.h
swift::core::fsd::FlightType
FlightType
Flight types.
Definition:
enums.h:90
messagebase.h
SWIFT_CORE_EXPORT
#define SWIFT_CORE_EXPORT
Export a class or function from the library.
Definition:
swiftcoreexport.h:20
Generated on Mon Mar 24 2025 16:42:19 for swift by
1.9.1