13using namespace swift::misc::aviation;
15namespace swift::core::fsd
18 double altitudeTrue,
double heightAgl,
double pitch,
double bank,
19 double heading,
double xVelocity,
double yVelocity,
20 double zVelocity,
double pitchRadPerSec,
double bankRadPerSec,
21 double headingRadPerSec,
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_xVelocity(xVelocity),
24 m_yVelocity(yVelocity), m_zVelocity(zVelocity), m_pitchRadPerSec(pitchRadPerSec),
25 m_bankRadPerSec(bankRadPerSec), m_headingRadPerSec(headingRadPerSec), m_noseGearAngle(noseGearAngle)
52 if (tokens.
size() < 12)
62 unpackPBH(tokens[5].toUInt(), pitch, bank, heading, unused);
76 tokens[11].toDouble(),
77 tokens[10].toDouble(),
78 tokens.
value(12, QStringLiteral(
"0")).toDouble() };
MessageBase()=default
Default Constructor.
QString m_sender
message sender
double m_noseGearAngle
Properties.
VisualPilotDataPeriodic(const QString &sender, double latitude, double longitude, double altitudeTrue, double heightAgl, double pitch, double bank, double heading, double xVelocity, double yVelocity, double zVelocity, double pitchRadPerSec, double bankRadPerSec, double headingRadPerSec, double noseGearAngle=0.0)
Constructor.
QStringList toTokens() const
Message converted to tokens.
double m_yVelocity
Properties.
double m_pitch
Properties.
double m_pitchRadPerSec
Properties.
static VisualPilotDataPeriodic fromTokens(const QStringList &tokens)
Construct from tokens.
double m_headingRadPerSec
Properties.
double m_heightAgl
Properties.
double m_latitude
Properties.
double m_longitude
Properties.
VisualPilotDataUpdate toUpdate() const
Return a regular visual update with the same values.
double m_heading
Properties.
double m_xVelocity
Properties.
double m_altitudeTrue
Properties.
double m_bankRadPerSec
Properties.
double m_zVelocity
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)