From db9236a26622bb445fdda1967d7fcbf523ffa784 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sat, 30 Sep 2017 20:14:55 +0200 Subject: [PATCH] Ref T129, formatting aircraft parts/situation --- src/blackmisc/aviation/aircraftparts.cpp | 76 ++++------- src/blackmisc/aviation/aircraftparts.h | 6 +- src/blackmisc/aviation/aircraftsituation.cpp | 125 +++++++------------ src/blackmisc/aviation/aircraftsituation.h | 106 ++++++++-------- 4 files changed, 124 insertions(+), 189 deletions(-) diff --git a/src/blackmisc/aviation/aircraftparts.cpp b/src/blackmisc/aviation/aircraftparts.cpp index b2c0fc6be..ec61d16ec 100644 --- a/src/blackmisc/aviation/aircraftparts.cpp +++ b/src/blackmisc/aviation/aircraftparts.cpp @@ -42,21 +42,15 @@ namespace BlackMisc if (index.isMyself()) { return CVariant::from(*this); } if (ITimestampBased::canHandleIndex(index)) { return ITimestampBased::propertyByIndex(index); } - ColumnIndex i = index.frontCasted(); + const ColumnIndex i = index.frontCasted(); switch (i) { - case IndexEngines: - return CVariant::fromValue(this->m_engines); - case IndexFlapsPercentage: - return CVariant::fromValue(this->m_flapsPercentage); - case IndexGearDown: - return CVariant::fromValue(this->m_gearDown); - case IndexLights: - return this->m_lights.propertyByIndex(index.copyFrontRemoved()); - case IndexSpoilersOut: - return CVariant::fromValue(this->m_spoilersOut); - default: - return CValueObject::propertyByIndex(index); + case IndexEngines: return CVariant::fromValue(m_engines); + case IndexFlapsPercentage: return CVariant::fromValue(m_flapsPercentage); + case IndexGearDown: return CVariant::fromValue(m_gearDown); + case IndexLights: return m_lights.propertyByIndex(index.copyFrontRemoved()); + case IndexSpoilersOut: return CVariant::fromValue(m_spoilersOut); + default: return CValueObject::propertyByIndex(index); } } @@ -65,27 +59,15 @@ namespace BlackMisc if (index.isMyself()) { (*this) = variant.to(); return; } if (ITimestampBased::canHandleIndex(index)) { ITimestampBased::setPropertyByIndex(index, variant); return; } - ColumnIndex i = index.frontCasted(); + const ColumnIndex i = index.frontCasted(); switch (i) { - case IndexEngines: - this->m_engines = variant.to < decltype(this->m_engines) > (); - break; - case IndexFlapsPercentage: - this->m_flapsPercentage = variant.toInt(); - break; - case IndexGearDown: - this->m_gearDown = variant.toBool(); - break; - case IndexLights: - this->m_lights.setPropertyByIndex(index.copyFrontRemoved(), variant); - break; - case IndexSpoilersOut: - this->m_spoilersOut = variant.toBool(); - break; - default: - CValueObject::setPropertyByIndex(index, variant); - break; + case IndexEngines: m_engines = variant.to < decltype(m_engines) > (); break; + case IndexFlapsPercentage: m_flapsPercentage = variant.toInt(); break; + case IndexGearDown: m_gearDown = variant.toBool(); break; + case IndexLights: m_lights.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexSpoilersOut: m_spoilersOut = variant.toBool(); break; + default: CValueObject::setPropertyByIndex(index, variant); break; } } @@ -94,21 +76,15 @@ namespace BlackMisc if (index.isMyself()) { return ITimestampBased::comparePropertyByIndex(CPropertyIndex(), compareValue); } if (ITimestampBased::canHandleIndex(index)) { return ITimestampBased::comparePropertyByIndex(index, compareValue); } - ColumnIndex i = index.frontCasted(); + const ColumnIndex i = index.frontCasted(); switch (i) { - case IndexEngines: - return Compare::compare(this->getEnginesCount(), compareValue.getEnginesCount()); - case IndexFlapsPercentage: - return Compare::compare(this->m_flapsPercentage, compareValue.getFlapsPercent()); - case IndexGearDown: - return Compare::compare(this->m_gearDown, compareValue.isGearDown()); + case IndexEngines: return Compare::compare(this->getEnginesCount(), compareValue.getEnginesCount()); + case IndexFlapsPercentage: return Compare::compare(m_flapsPercentage, compareValue.getFlapsPercent()); + case IndexGearDown: return Compare::compare(m_gearDown, compareValue.isGearDown()); + case IndexSpoilersOut: return Compare::compare(m_spoilersOut, compareValue.isSpoilersOut()); case IndexLights: - break; - case IndexSpoilersOut: - return Compare::compare(this->m_spoilersOut, compareValue.isSpoilersOut()); - default: - break; + default: break; } Q_ASSERT_X(false, Q_FUNC_INFO, "No comparison"); return 0; @@ -126,26 +102,26 @@ namespace BlackMisc CAircraftEngine CAircraftParts::getEngine(int number) const { - return this->m_engines.getEngine(number); + return m_engines.getEngine(number); } bool CAircraftParts::isEngineOn(int number) const { - return this->m_engines.isEngineOn(number); + return m_engines.isEngineOn(number); } bool CAircraftParts::isAnyEngineOn() const { - return this->m_engines.isAnyEngineOn(); + return m_engines.isAnyEngineOn(); } double CAircraftParts::isOnGroundInterpolated() const { - if (this->m_isOnGroundInterpolated < 0) + if (m_isOnGroundInterpolated < 0) { - return this->m_isOnGround ? 1.0 : 0.0; + return m_isOnGround ? 1.0 : 0.0; } - return this->m_isOnGroundInterpolated; + return m_isOnGroundInterpolated; } } // namespace diff --git a/src/blackmisc/aviation/aircraftparts.h b/src/blackmisc/aviation/aircraftparts.h index 73cd2fd40..fd44521f7 100644 --- a/src/blackmisc/aviation/aircraftparts.h +++ b/src/blackmisc/aviation/aircraftparts.h @@ -32,7 +32,7 @@ namespace BlackMisc //! Value object encapsulating information of aircraft's parts class BLACKMISC_EXPORT CAircraftParts : public CValueObject, - public BlackMisc::ITimestampBased + public ITimestampBased { public: //! Properties by index @@ -126,10 +126,10 @@ namespace BlackMisc void setOnGroundInterpolated(double onGround) { m_isOnGroundInterpolated = onGround; } //! Milliseconds to add to timestamp for interpolation - void setTimeOffsetMs(qint64 offset) { this->m_timeOffsetMs = offset; } + void setTimeOffsetMs(qint64 offset) { m_timeOffsetMs = offset; } //! Milliseconds to add to timestamp for interpolation - qint64 getTimeOffsetMs() const { return this->m_timeOffsetMs; } + qint64 getTimeOffsetMs() const { return m_timeOffsetMs; } //! Timestamp with offset added for interpolation qint64 getAdjustedMSecsSinceEpoch() const { return this->getMSecsSinceEpoch() + this->getTimeOffsetMs(); } diff --git a/src/blackmisc/aviation/aircraftsituation.cpp b/src/blackmisc/aviation/aircraftsituation.cpp index b117fbf2f..647b7b055 100644 --- a/src/blackmisc/aviation/aircraftsituation.cpp +++ b/src/blackmisc/aviation/aircraftsituation.cpp @@ -42,12 +42,12 @@ namespace BlackMisc QString CAircraftSituation::convertToQString(bool i18n) const { - const QString s = (this->m_position.toQString(i18n)) % - QLatin1String(" bank: ") % (this->m_bank.toQString(i18n)) % - QLatin1String(" pitch: ") % (this->m_pitch.toQString(i18n)) % - QLatin1String(" gs: ") % (this->m_groundSpeed.toQString(i18n)) % - QLatin1String(" elevation: ") % (this->m_groundElevation.toQString(i18n)) % - QLatin1String(" heading: ") % (this->m_heading.toQString(i18n)) % + const QString s = (m_position.toQString(i18n)) % + QLatin1String(" bank: ") % (m_bank.toQString(i18n)) % + QLatin1String(" pitch: ") % (m_pitch.toQString(i18n)) % + QLatin1String(" gs: ") % (m_groundSpeed.toQString(i18n)) % + QLatin1String(" elevation: ") % (m_groundElevation.toQString(i18n)) % + QLatin1String(" heading: ") % (m_heading.toQString(i18n)) % QLatin1String(" timestamp: ") % (this->hasValidTimestamp() ? this->getFormattedUtcTimestampDhms() : QStringLiteral("-")); return s; } @@ -97,36 +97,21 @@ namespace BlackMisc const ColumnIndex i = index.frontCasted(); switch (i) { - case IndexPosition: - return this->m_position.propertyByIndex(index.copyFrontRemoved()); - case IndexLatitude: - return this->latitude().propertyByIndex(index.copyFrontRemoved()); - case IndexLongitude: - return this->longitude().propertyByIndex(index.copyFrontRemoved()); - case IndexAltitude: - return this->getAltitude().propertyByIndex(index.copyFrontRemoved()); - case IndexHeading: - return this->m_heading.propertyByIndex(index.copyFrontRemoved()); - case IndexPitch: - return this->m_pitch.propertyByIndex(index.copyFrontRemoved()); - case IndexBank: - return this->m_bank.propertyByIndex(index.copyFrontRemoved()); - case IndexGroundSpeed: - return this->m_groundSpeed.propertyByIndex(index.copyFrontRemoved()); - case IndexGroundElevation: - return this->m_groundElevation.propertyByIndex(index.copyFrontRemoved()); - case IndexCallsign: - return this->m_correspondingCallsign.propertyByIndex(index.copyFrontRemoved()); - case IndexIsOnGround: - return CVariant::fromValue(m_isOnGround); - case IndexIsOnGroundString: - return CVariant::fromValue(this->isOnGroundAsString()); - case IndexOnGroundReliability: - return CVariant::fromValue(m_onGroundReliability); - case IndexOnGroundReliabilityString: - return CVariant::fromValue(this->getOnGroundReliabilityAsString()); - default: - return CValueObject::propertyByIndex(index); + case IndexPosition: return m_position.propertyByIndex(index.copyFrontRemoved()); + case IndexLatitude: return this->latitude().propertyByIndex(index.copyFrontRemoved()); + case IndexLongitude: return this->longitude().propertyByIndex(index.copyFrontRemoved()); + case IndexAltitude: return this->getAltitude().propertyByIndex(index.copyFrontRemoved()); + case IndexHeading: return m_heading.propertyByIndex(index.copyFrontRemoved()); + case IndexPitch: return m_pitch.propertyByIndex(index.copyFrontRemoved()); + case IndexBank: return m_bank.propertyByIndex(index.copyFrontRemoved()); + case IndexGroundSpeed: return m_groundSpeed.propertyByIndex(index.copyFrontRemoved()); + case IndexGroundElevation: return m_groundElevation.propertyByIndex(index.copyFrontRemoved()); + case IndexCallsign: return m_correspondingCallsign.propertyByIndex(index.copyFrontRemoved()); + case IndexIsOnGround: return CVariant::fromValue(m_isOnGround); + case IndexIsOnGroundString: return CVariant::fromValue(this->isOnGroundAsString()); + case IndexOnGroundReliability: return CVariant::fromValue(m_onGroundReliability); + case IndexOnGroundReliabilityString: return CVariant::fromValue(this->getOnGroundReliabilityAsString()); + default: return CValueObject::propertyByIndex(index); } } @@ -142,33 +127,15 @@ namespace BlackMisc const ColumnIndex i = index.frontCasted(); switch (i) { - case IndexPosition: - this->m_position.setPropertyByIndex(index.copyFrontRemoved(), variant); - break; - case IndexPitch: - this->m_pitch.setPropertyByIndex(index.copyFrontRemoved(), variant); - break; - case IndexBank: - this->m_bank.setPropertyByIndex(index.copyFrontRemoved(), variant); - break; - case IndexGroundSpeed: - this->m_groundSpeed.setPropertyByIndex(index.copyFrontRemoved(), variant); - break; - case IndexGroundElevation: - this->m_groundElevation.setPropertyByIndex(index.copyFrontRemoved(), variant); - break; - case IndexCallsign: - this->m_correspondingCallsign.setPropertyByIndex(index.copyFrontRemoved(), variant); - break; - case IndexIsOnGround: - this->m_isOnGround = variant.toInt(); - break; - case IndexOnGroundReliability: - this->m_onGroundReliability = variant.toInt(); - break; - default: - CValueObject::setPropertyByIndex(index, variant); - break; + case IndexPosition: m_position.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexPitch: m_pitch.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexBank: m_bank.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexGroundSpeed: m_groundSpeed.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexGroundElevation: m_groundElevation.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexCallsign: m_correspondingCallsign.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexIsOnGround: m_isOnGround = variant.toInt(); break; + case IndexOnGroundReliability: m_onGroundReliability = variant.toInt(); break; + default: CValueObject::setPropertyByIndex(index, variant); break; } } @@ -179,28 +146,20 @@ namespace BlackMisc const ColumnIndex i = index.frontCasted(); switch (i) { - case IndexPosition: - return this->m_position.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPosition()); - case IndexAltitude: - return this->getAltitude().comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getAltitude()); - case IndexPitch: - return this->m_pitch.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPitch()); - case IndexBank: - return this->m_bank.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getBank()); - case IndexGroundSpeed: - return this->m_groundSpeed.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getGroundSpeed()); - case IndexGroundElevation: - return this->m_groundElevation.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getGroundElevation()); - case IndexCallsign: - return this->m_correspondingCallsign.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getCallsign()); + case IndexPosition: return m_position.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPosition()); + case IndexAltitude: return this->getAltitude().comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getAltitude()); + case IndexPitch: return m_pitch.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPitch()); + case IndexBank: return m_bank.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getBank()); + case IndexGroundSpeed: return m_groundSpeed.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getGroundSpeed()); + case IndexGroundElevation: return m_groundElevation.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getGroundElevation()); + case IndexCallsign: return m_correspondingCallsign.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getCallsign()); case IndexIsOnGround: case IndexIsOnGroundString: - return Compare::compare(this->m_isOnGround, compareValue.m_isOnGround); + return Compare::compare(m_isOnGround, compareValue.m_isOnGround); case IndexOnGroundReliability: case IndexOnGroundReliabilityString: - return Compare::compare(this->m_onGroundReliability, compareValue.m_onGroundReliability); - default: - break; + return Compare::compare(m_onGroundReliability, compareValue.m_onGroundReliability); + default: break; } const QString assertMsg("No comparison for index " + index.toQString()); BLACK_VERIFY_X(false, Q_FUNC_INFO, qUtf8Printable(assertMsg)); @@ -262,8 +221,8 @@ namespace BlackMisc void CAircraftSituation::setCallsign(const CCallsign &callsign) { - this->m_correspondingCallsign = callsign; - this->m_correspondingCallsign.setTypeHint(CCallsign::Aircraft); + m_correspondingCallsign = callsign; + m_correspondingCallsign.setTypeHint(CCallsign::Aircraft); } } // namespace } // namespace diff --git a/src/blackmisc/aviation/aircraftsituation.h b/src/blackmisc/aviation/aircraftsituation.h index 0f1f09690..9fd10acda 100644 --- a/src/blackmisc/aviation/aircraftsituation.h +++ b/src/blackmisc/aviation/aircraftsituation.h @@ -40,13 +40,13 @@ namespace BlackMisc //! Value object encapsulating information of an aircraft's situation class BLACKMISC_EXPORT CAircraftSituation : public CValueObject, - public BlackMisc::Geo::ICoordinateGeodetic, public BlackMisc::ITimestampBased + public Geo::ICoordinateGeodetic, public ITimestampBased { public: //! Properties by index enum ColumnIndex { - IndexPosition = BlackMisc::CPropertyIndex::GlobalIndexCAircraftSituation, + IndexPosition = CPropertyIndex::GlobalIndexCAircraftSituation, IndexLatitude, IndexLongitude, IndexAltitude, @@ -84,42 +84,42 @@ namespace BlackMisc CAircraftSituation(); //! Comprehensive constructor - CAircraftSituation(const BlackMisc::Geo::CCoordinateGeodetic &position, - const BlackMisc::Aviation::CHeading &heading = {}, - const BlackMisc::PhysicalQuantities::CAngle &pitch = {}, - const BlackMisc::PhysicalQuantities::CAngle &bank = {}, - const BlackMisc::PhysicalQuantities::CSpeed &gs = {}, - const BlackMisc::Aviation::CAltitude &groundElevation = { 0, nullptr }); + CAircraftSituation(const Geo::CCoordinateGeodetic &position, + const CHeading &heading = {}, + const PhysicalQuantities::CAngle &pitch = {}, + const PhysicalQuantities::CAngle &bank = {}, + const PhysicalQuantities::CSpeed &gs = {}, + const CAltitude &groundElevation = { 0, nullptr }); //! Comprehensive constructor - CAircraftSituation(const BlackMisc::Aviation::CCallsign &correspondingCallsign, - const BlackMisc::Geo::CCoordinateGeodetic &position, - const BlackMisc::Aviation::CHeading &heading = {}, - const BlackMisc::PhysicalQuantities::CAngle &pitch = {}, - const BlackMisc::PhysicalQuantities::CAngle &bank = {}, - const BlackMisc::PhysicalQuantities::CSpeed &gs = {}, - const BlackMisc::Aviation::CAltitude &groundElevation = { 0, nullptr }); + CAircraftSituation(const CCallsign &correspondingCallsign, + const Geo::CCoordinateGeodetic &position, + const CHeading &heading = {}, + const PhysicalQuantities::CAngle &pitch = {}, + const PhysicalQuantities::CAngle &bank = {}, + const PhysicalQuantities::CSpeed &gs = {}, + const CAltitude &groundElevation = { 0, nullptr }); - //! \copydoc BlackMisc::Mixin::Index::propertyByIndex - CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const; + //! \copydoc Mixin::Index::propertyByIndex + CVariant propertyByIndex(const CPropertyIndex &index) const; - //! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex - void setPropertyByIndex(const BlackMisc::CPropertyIndex &index, const CVariant &variant); + //! \copydoc Mixin::Index::setPropertyByIndex + void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant); //! Compare by index int comparePropertyByIndex(const CPropertyIndex &index, const CAircraftSituation &compareValue) const; //! Get position - const BlackMisc::Geo::CCoordinateGeodetic &getPosition() const { return this->m_position; } + const Geo::CCoordinateGeodetic &getPosition() const { return m_position; } //! Set position - void setPosition(const BlackMisc::Geo::CCoordinateGeodetic &position) { this->m_position = position; } + void setPosition(const Geo::CCoordinateGeodetic &position) { m_position = position; } //! \copydoc Geo::ICoordinateGeodetic::latitude() - virtual BlackMisc::Geo::CLatitude latitude() const override { return this->m_position.latitude(); } + virtual Geo::CLatitude latitude() const override { return m_position.latitude(); } //! \copydoc Geo::ICoordinateGeodetic::longitude() - virtual BlackMisc::Geo::CLongitude longitude() const override { return this->m_position.longitude(); } + virtual Geo::CLongitude longitude() const override { return m_position.longitude(); } //! On ground? IsOnGround isOnGround() const { return static_cast(m_isOnGround); } @@ -149,81 +149,81 @@ namespace BlackMisc QString getOnGroundInfo() const; //! \copydoc Geo::ICoordinateGeodetic::geodeticHeight - const BlackMisc::Aviation::CAltitude &geodeticHeight() const override { return this->m_position.geodeticHeight(); } + const CAltitude &geodeticHeight() const override { return m_position.geodeticHeight(); } //! \copydoc Geo::ICoordinateGeodetic::normalVector - virtual QVector3D normalVector() const override { return this->m_position.normalVector(); } + virtual QVector3D normalVector() const override { return m_position.normalVector(); } //! \copydoc Geo::ICoordinateGeodetic::normalVectorDouble - virtual std::array normalVectorDouble() const override { return this->m_position.normalVectorDouble(); } + virtual std::array normalVectorDouble() const override { return m_position.normalVectorDouble(); } //! Elevation of the ground directly beneath - const BlackMisc::Aviation::CAltitude &getGroundElevation() const { return this->m_groundElevation; } + const CAltitude &getGroundElevation() const { return m_groundElevation; } //! Is ground elevation value available bool hasGroundElevation() const; //! Elevation of the ground directly beneath - void setGroundElevation(const BlackMisc::Aviation::CAltitude &elevation) { this->m_groundElevation = elevation; } + void setGroundElevation(const CAltitude &elevation) { m_groundElevation = elevation; } //! Height above ground. - BlackMisc::PhysicalQuantities::CLength getHeightAboveGround() const; + PhysicalQuantities::CLength getHeightAboveGround() const; //! Get heading - const BlackMisc::Aviation::CHeading &getHeading() const { return this->m_heading; } + const CHeading &getHeading() const { return m_heading; } //! Set heading - void setHeading(const BlackMisc::Aviation::CHeading &heading) { this->m_heading = heading; } + void setHeading(const CHeading &heading) { m_heading = heading; } //! Get altitude - const BlackMisc::Aviation::CAltitude &getAltitude() const { return this->m_position.geodeticHeight(); } + const CAltitude &getAltitude() const { return m_position.geodeticHeight(); } //! Get altitude under consideration of ground elevation - BlackMisc::Aviation::CAltitude getCorrectedAltitude() const; + CAltitude getCorrectedAltitude() const; //! Set altitude - void setAltitude(const BlackMisc::Aviation::CAltitude &altitude) { this->m_position.setGeodeticHeight(altitude); } + void setAltitude(const CAltitude &altitude) { m_position.setGeodeticHeight(altitude); } //! Get pitch - const BlackMisc::PhysicalQuantities::CAngle &getPitch() const { return this->m_pitch; } + const PhysicalQuantities::CAngle &getPitch() const { return m_pitch; } //! Set pitch - void setPitch(const BlackMisc::PhysicalQuantities::CAngle &pitch) { this->m_pitch = pitch; } + void setPitch(const PhysicalQuantities::CAngle &pitch) { m_pitch = pitch; } //! Get bank (angle) - const BlackMisc::PhysicalQuantities::CAngle &getBank() const { return this->m_bank; } + const PhysicalQuantities::CAngle &getBank() const { return m_bank; } //! Set bank (angle) - void setBank(const BlackMisc::PhysicalQuantities::CAngle &bank) { this->m_bank = bank; } + void setBank(const PhysicalQuantities::CAngle &bank) { m_bank = bank; } //! Get ground speed - const BlackMisc::PhysicalQuantities::CSpeed &getGroundSpeed() const { return this->m_groundSpeed; } + const PhysicalQuantities::CSpeed &getGroundSpeed() const { return m_groundSpeed; } //! Set ground speed - void setGroundSpeed(const BlackMisc::PhysicalQuantities::CSpeed &groundspeed) { this->m_groundSpeed = groundspeed; } + void setGroundSpeed(const PhysicalQuantities::CSpeed &groundspeed) { m_groundSpeed = groundspeed; } //! Corresponding callsign - const BlackMisc::Aviation::CCallsign &getCallsign() const { return this->m_correspondingCallsign; } + const CCallsign &getCallsign() const { return m_correspondingCallsign; } //! Corresponding callsign - void setCallsign(const BlackMisc::Aviation::CCallsign &callsign); + void setCallsign(const CCallsign &callsign); //! Milliseconds to add to timestamp for interpolation - void setTimeOffsetMs(qint64 offset) { this->m_timeOffsetMs = offset; } + void setTimeOffsetMs(qint64 offset) { m_timeOffsetMs = offset; } //! Milliseconds to add to timestamp for interpolation - qint64 getTimeOffsetMs() const { return this->m_timeOffsetMs; } + qint64 getTimeOffsetMs() const { return m_timeOffsetMs; } //! Timestamp with offset added for interpolation qint64 getAdjustedMSecsSinceEpoch() const { return this->getMSecsSinceEpoch() + this->getTimeOffsetMs(); } //! Set flag indicating this is an interim position update - void setInterimFlag(bool flag) { this->m_isInterim = flag; } + void setInterimFlag(bool flag) { m_isInterim = flag; } //! Get flag indicating this is an interim position update - bool isInterim() const { return this->m_isInterim; } + bool isInterim() const { return m_isInterim; } - //! \copydoc BlackMisc::Mixin::String::toQString + //! \copydoc Mixin::String::toQString QString convertToQString(bool i18n = false) const; //! Enum to string @@ -234,12 +234,12 @@ namespace BlackMisc private: CCallsign m_correspondingCallsign; - BlackMisc::Geo::CCoordinateGeodetic m_position; - BlackMisc::Aviation::CHeading m_heading; - BlackMisc::PhysicalQuantities::CAngle m_pitch; - BlackMisc::PhysicalQuantities::CAngle m_bank; - BlackMisc::PhysicalQuantities::CSpeed m_groundSpeed; - BlackMisc::Aviation::CAltitude m_groundElevation{0, BlackMisc::Aviation::CAltitude::MeanSeaLevel, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()}; + Geo::CCoordinateGeodetic m_position; + CHeading m_heading; + PhysicalQuantities::CAngle m_pitch; + PhysicalQuantities::CAngle m_bank; + PhysicalQuantities::CSpeed m_groundSpeed; + CAltitude m_groundElevation{0, CAltitude::MeanSeaLevel, PhysicalQuantities::CLengthUnit::nullUnit()}; int m_isOnGround = static_cast(CAircraftSituation::OnGroundSituationUnknown); int m_onGroundReliability = static_cast(CAircraftSituation::OnGroundReliabilityNoSet); qint64 m_timeOffsetMs = 0;