swift
src
core
fsd
interimpilotdataupdate.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_INTERIMPILOTDATAUPDATE_H
7
#define SWIFT_CORE_FSD_INTERIMPILOTDATAUPDATE_H
8
9
#include "
core/fsd/messagebase.h
"
10
11
namespace
swift::core::fsd
12
{
15
class
SWIFT_CORE_EXPORT
InterimPilotDataUpdate
:
public
MessageBase
16
{
17
public
:
19
InterimPilotDataUpdate
(
const
QString &sender,
const
QString &receiver,
double
latitude,
double
longitude,
20
int
altitudeTrue,
int
groundSpeed,
double
pitch,
double
bank,
double
heading,
21
bool
onGround);
22
24
QStringList toTokens()
const
;
25
27
static
InterimPilotDataUpdate
fromTokens(
const
QStringList &tokens);
28
30
static
QString
pdu
() {
return
"#SB"
; }
31
34
double
m_latitude = 0.0;
35
double
m_longitude = 0.0;
36
int
m_altitudeTrue = 0.0;
37
int
m_groundSpeed = 0.0;
38
double
m_pitch = 0.0;
39
double
m_bank = 0.0;
40
double
m_heading = 0.0;
41
bool
m_onGround =
false
;
43
44
private
:
45
InterimPilotDataUpdate
();
46
};
47
49
inline
bool
operator==(
const
InterimPilotDataUpdate
&lhs,
const
InterimPilotDataUpdate
&rhs)
50
{
51
return
lhs.
sender
() == rhs.
sender
() && lhs.
receiver
() == rhs.
receiver
() &&
52
qFuzzyCompare(lhs.
m_latitude
, rhs.
m_latitude
) && qFuzzyCompare(lhs.
m_longitude
, rhs.
m_longitude
) &&
53
lhs.
m_altitudeTrue
== rhs.
m_altitudeTrue
&& qFuzzyCompare(lhs.
m_pitch
, rhs.
m_pitch
) &&
54
qFuzzyCompare(lhs.
m_bank
, rhs.
m_bank
) && qFuzzyCompare(lhs.
m_heading
, rhs.
m_heading
) &&
55
lhs.
m_onGround
== rhs.
m_onGround
;
56
}
57
59
inline
bool
operator!=
(
const
InterimPilotDataUpdate
&lhs,
const
InterimPilotDataUpdate
&rhs)
60
{
61
return
!(lhs == rhs);
62
}
63
}
// namespace swift::core::fsd
64
65
#endif
// SWIFT_CORE_FSD_INTERIMPILOTDATAUPDATE_H
swift::core::fsd::operator!=
bool operator!=(const AddAtc &lhs, const AddAtc &rhs)
Not equal operator.
Definition:
addatc.h:68
swift::core::fsd::InterimPilotDataUpdate
Interim pilot data update sent to specific receivers faster than the standard broadcast update.
Definition:
interimpilotdataupdate.h:16
swift::core::fsd::InterimPilotDataUpdate::m_longitude
double m_longitude
Properties.
Definition:
interimpilotdataupdate.h:35
swift::core::fsd::InterimPilotDataUpdate::m_pitch
double m_pitch
Properties.
Definition:
interimpilotdataupdate.h:38
swift::core::fsd::InterimPilotDataUpdate::m_heading
double m_heading
Properties.
Definition:
interimpilotdataupdate.h:40
swift::core::fsd::InterimPilotDataUpdate::m_latitude
double m_latitude
Properties.
Definition:
interimpilotdataupdate.h:34
swift::core::fsd::InterimPilotDataUpdate::m_altitudeTrue
int m_altitudeTrue
Properties.
Definition:
interimpilotdataupdate.h:36
swift::core::fsd::InterimPilotDataUpdate::pdu
static QString pdu()
PDU identifier.
Definition:
interimpilotdataupdate.h:30
swift::core::fsd::InterimPilotDataUpdate::m_bank
double m_bank
Properties.
Definition:
interimpilotdataupdate.h:39
swift::core::fsd::InterimPilotDataUpdate::m_onGround
bool m_onGround
Properties.
Definition:
interimpilotdataupdate.h:41
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
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