13 using namespace swift::misc::aviation;
15 namespace swift::core::fsd
17 VisualPilotDataStopped::VisualPilotDataStopped() : MessageBase() {}
19 VisualPilotDataStopped::VisualPilotDataStopped(
const QString &sender,
double latitude,
double longitude,
20 double altitudeTrue,
double heightAgl,
double pitch,
double bank,
21 double heading,
double noseGearAngle)
22 :
MessageBase(sender, {}), m_latitude(latitude), m_longitude(longitude), m_altitudeTrue(altitudeTrue),
23 m_heightAgl(heightAgl), m_pitch(pitch), m_bank(bank), m_heading(heading), m_noseGearAngle(noseGearAngle)
44 if (tokens.
size() < 6)
54 unpackPBH(tokens[5].toUInt(), pitch, bank, heading, unused);
57 tokens[4].toDouble(), pitch, bank, heading,
58 tokens.
value(12, QStringLiteral(
"0")).toDouble());
QString m_sender
message sender
VisualPilotDataUpdate with velocity assumed to be zero.
VisualPilotDataUpdate toUpdate() const
Return a regular visual update with the same values.
double m_altitudeTrue
Properties.
QStringList toTokens() const
Message converted to tokens.
double m_heading
Properties.
double m_latitude
Properties.
double m_pitch
Properties.
double m_heightAgl
Properties.
double m_longitude
Properties.
static VisualPilotDataStopped fromTokens(const QStringList &tokens)
Construct from tokens.
double m_noseGearAngle
Properties.
Pilot data update broadcasted to pilots in range every 0.2 seconds.
Class for emitting a log message.
Derived & debug()
Set the severity to debug.
Free functions in swift::misc.
void unpackPBH(quint32 pbh, double &pitch, double &bank, double &heading, bool &onGround)
Unpack pitch, bank, heading and onGround from 32 bit integer.
void packPBH(double pitch, double bank, double heading, bool onGround, quint32 &pbh)
Pack pitch, bank, heading and onGround into 32 bit integer.
void push_back(QList< T >::parameter_type value)
qsizetype size() const const
T value(qsizetype i) const const
QString number(double n, char format, int precision)