swift
|
Value object encapsulating information of an aircraft's situation. More...
Public Types | |
enum | ColumnIndex { IndexPosition = CPropertyIndexRef::GlobalIndexCAircraftSituation , IndexLatitude , IndexLongitude , IndexAltitude , IndexHeading , IndexBank , IndexIsOnGroundInfo , IndexPitch , IndexPBHInfo , IndexVelocity , IndexGroundSpeed , IndexGroundElevationPlane , IndexGroundElevationInfo , IndexGroundElevationInfoTransferred , IndexGroundElevationInfoString , IndexGroundElevationPlusInfo , IndexCallsign , IndexCG , IndexCanLikelySkipNearGroundInterpolation } |
Properties by index. | |
enum | AltitudeCorrection { NoCorrection , Underflow , DraggedToGround , AGL , NoElevation , UnknownCorrection } |
How was altitude corrected? More... | |
enum | GndElevationInfo { NoElevationInfo , Test , SituationChange , Extrapolated , Average , Interpolated , FromCache , FromProvider } |
Where did we get elevation from? More... | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
![]() | |
enum | ColumnIndex { IndexLatitude = CPropertyIndexRef::GlobalIndexICoordinateGeodetic , IndexLongitude , IndexLatitudeAsString , IndexLongitudeAsString , IndexGeodeticHeight , IndexGeodeticHeightAsString , IndexNormalVector } |
Properties by index. | |
![]() | |
enum | ColumnIndex { IndexOffsetMs , IndexAdjustedMsWithOffset , IndexOffsetWithUnit } |
Properties by index. | |
![]() | |
enum | ColumnIndex { IndexUtcTimestamp = CPropertyIndexRef::GlobalIndexITimestampBased , IndexUtcTimestampFormattedYmdhms , IndexUtcTimestampFormattedYmdhmsz , IndexUtcTimestampFormattedMdhms , IndexUtcTimestampFormattedMdhmsz , IndexUtcTimestampFormattedDhms , IndexUtcTimestampFormattedHms , IndexUtcTimestampFormattedHm , IndexMSecsSinceEpoch } |
Properties by index. | |
Public Member Functions | |
CAircraftSituation () | |
Default constructor. | |
CAircraftSituation (const CCallsign &correspondingCallsign) | |
Constructor with callsign. | |
CAircraftSituation (const geo::CCoordinateGeodetic &position, const CHeading &heading={}, const physical_quantities::CAngle &pitch={}, const physical_quantities::CAngle &bank={}, const physical_quantities::CSpeed &gs={}, const geo::CElevationPlane &groundElevation={}) | |
Comprehensive constructor. | |
CAircraftSituation (const CCallsign &correspondingCallsign, const geo::CCoordinateGeodetic &position, const CHeading &heading={}, const physical_quantities::CAngle &pitch={}, const physical_quantities::CAngle &bank={}, const physical_quantities::CSpeed &gs={}, const geo::CElevationPlane &groundElevation={}) | |
Comprehensive constructor. | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const CAircraftSituation &compareValue) const |
Compare for index. More... | |
const geo::CCoordinateGeodetic & | getPosition () const |
Get position. | |
bool | isPositionNull () const |
Position null? | |
bool | isPositionOrAltitudeNull () const |
Position or altitude null? | |
virtual bool | isNull () const |
Null situation. | |
bool | isOtherElevationInfoBetter (GndElevationInfo otherInfo, bool transferred) const |
Is given info better (more accurate)? | |
bool | equalPbh (const CAircraftSituation &other) const |
Equal pitch, bank heading. More... | |
bool | equalPbhAndVector (const CAircraftSituation &other) const |
Equal PBH and vector. More... | |
bool | equalPbhVectorAltitude (const CAircraftSituation &other) const |
Equal PBH and vecto, plus altitude. More... | |
bool | equalPbhVectorAltitudeElevation (const CAircraftSituation &other) const |
Equal PBH and vecto, plus altitude/elevation. More... | |
void | setNull () |
Set to null. | |
void | setPosition (const geo::CCoordinateGeodetic &position) |
Set position. | |
virtual geo::CLatitude | latitude () const |
Latitude. More... | |
virtual geo::CLongitude | longitude () const |
Longitude. More... | |
bool | isOnGround () const |
Is on ground? | |
bool | isOnGroundFromParts () const |
On ground by parts? | |
bool | isOnGroundFromNetwork () const |
On ground by network flag? | |
bool | isOnGroundInfoAvailable () const |
On ground info available? | |
bool | shouldGuessOnGround () const |
Should we guess on ground? | |
physical_quantities::CLength | getGroundDistance (const physical_quantities::CLength ¢erOfGravity) const |
Distance to ground, null if impossible to calculate. | |
bool | hasGroundDetailsForGndInterpolation () const |
Do the ground details permit ground interpolation? | |
void | setOnGroundDetails (COnGroundInfo::OnGroundDetails details) |
On ground details. | |
aviation::COnGroundInfo | getOnGroundInfo () const |
On ground info. | |
void | setOnGroundInfo (const aviation::COnGroundInfo &info) |
Set the on ground info. | |
const CAltitude & | geodeticHeight () const |
Height, ellipsoidal or geodetic height (used in GPS) More... | |
virtual QVector3D | normalVector () const |
Normal vector. More... | |
virtual std::array< double, 3 > | normalVectorDouble () const |
Normal vector with double precision. More... | |
const CAltitude & | getGroundElevation () const |
Elevation of the ground directly beneath. | |
const geo::CElevationPlane & | getGroundElevationPlane () const |
Elevation of the ground directly beneath. | |
GndElevationInfo | getGroundElevationInfo () const |
How did we get gnd.elevation? | |
QString | getGroundElevationInfoAsString () const |
How did we get gnd.elevation? | |
QString | getGroundElevationAndInfo () const |
Ground elevation plus info. | |
bool | isGroundElevationInfoTransferred () const |
Is the elv.info transferred? | |
void | setGroundElevationInfo (GndElevationInfo details) |
How we did get gnd.elevation. | |
bool | canTransferGroundElevation (const CAircraftSituation &transferToSituation, const physical_quantities::CLength &radius=geo::CElevationPlane::singlePointRadius()) const |
Can the elevation be transferred to another situation? | |
bool | transferGroundElevationFromMe (CAircraftSituation &transferToSituation, const physical_quantities::CLength &radius=geo::CElevationPlane::singlePointRadius()) const |
Transfer from "this" situation to otherSituation . More... | |
bool | transferGroundElevationToMe (const CAircraftSituation &fromSituation, const physical_quantities::CLength &radius, bool transferred) |
Transfer ground elevation from given situation (to me) | |
bool | transferGroundElevationToMe (const CAircraftSituation &fromSituation, bool transferred) |
Transfer ground elevation from given situation (to me) | |
bool | interpolateElevation (const aviation::CAircraftSituation &oldSituation, const aviation::CAircraftSituation &newSituation) |
Interpolate "this" elevation from the two adjacent positions. More... | |
bool | hasGroundElevation () const |
Is ground elevation value available. | |
bool | hasInboundGroundDetails () const |
Has inbound ground details. | |
bool | setGroundElevation (const aviation::CAltitude &altitude, GndElevationInfo info, bool transferred=false) |
Elevation of the ground directly beneath at the given situation. | |
bool | setGroundElevation (const geo::CElevationPlane &elevationPlane, GndElevationInfo info, bool transferred=false) |
Elevation of the ground directly beneath. | |
bool | setGroundElevationChecked (const geo::CElevationPlane &elevationPlane, GndElevationInfo info, bool transferred=false) |
Set elevation of the ground directly beneath, but checked. More... | |
void | resetGroundElevation () |
Reset ground elevation. | |
physical_quantities::CLength | getHeightAboveGround () const |
Height above ground. | |
const CHeading & | getHeading () const |
Get heading. | |
void | setHeading (const CHeading &heading) |
Set heading. | |
const CAltitude & | getAltitude () const |
Get altitude. | |
physical_quantities::CLengthUnit | getAltitudeUnit () const |
Get altitude unit. | |
physical_quantities::CLengthUnit | getAltitudeOrDefaultUnit () const |
Get altitude unit. | |
void | setAltitude (const CAltitude &altitude) |
Set altitude. | |
CAltitude | addAltitudeOffset (const physical_quantities::CLength &offset) |
Add offset to altitude. | |
CAircraftSituation | withAltitudeOffset (const physical_quantities::CLength &offset) const |
Situation with altitude offset. | |
const CAltitude & | getPressureAltitude () const |
Get pressure altitude. | |
void | setPressureAltitude (const CAltitude &altitude) |
Set pressure altitude. | |
const physical_quantities::CAngle & | getPitch () const |
Get pitch. | |
void | setPitch (const physical_quantities::CAngle &pitch) |
Set pitch. | |
const physical_quantities::CAngle & | getBank () const |
Get bank (angle) | |
void | setBank (const physical_quantities::CAngle &bank) |
Set bank (angle) | |
void | setZeroPBH () |
Set PBH values to 0 (zero) | |
void | setZeroPBHandGs () |
Set PBH and GS values to 0 (zero) | |
QString | getPBHInfo () const |
Get PBH info (all together) | |
void | setVelocity (const CAircraftVelocity &velocity) |
Set 6DOF velocity. | |
const CAircraftVelocity & | getVelocity () const |
Get 6DOF velocity. | |
bool | hasVelocity () const |
Is velocity non-zero? | |
const physical_quantities::CSpeed & | getGroundSpeed () const |
Get ground speed. | |
void | setGroundSpeed (const physical_quantities::CSpeed &groundspeed) |
Set ground speed. | |
bool | isMoving () const |
Is moving? Means ground speed > epsilon. | |
bool | canLikelySkipNearGroundInterpolation () const |
Situation looks like an aircraft not near ground. | |
physical_quantities::CLength | getDistancePerTime (std::chrono::milliseconds, const physical_quantities::CLength &min=physical_quantities::CLength::null()) const |
Distance per milliseconds. | |
physical_quantities::CLength | getDistancePerTime250ms (const physical_quantities::CLength &min=physical_quantities::CLength::null()) const |
Distance per milliseconds (250ms) | |
const CCallsign & | getCallsign () const |
Corresponding callsign. | |
bool | hasCallsign () const |
Has corresponding callsign. | |
void | setCallsign (const CCallsign &callsign) |
Corresponding callsign. | |
const physical_quantities::CLength & | getCG () const |
Get CG if any. | |
void | setCG (const physical_quantities::CLength &cg) |
Set CG. | |
bool | hasCG () const |
Has CG set? | |
void | setInterimFlag (bool flag) |
Set flag indicating this is an interim position update. | |
bool | adjustGroundFlag (const CAircraftParts &parts, bool alwaysSetDetails, double timeDeviationFactor=0.1, qint64 *differenceMs=nullptr) |
Transfer ground flag from parts. More... | |
bool | adjustGroundFlag (const CAircraftPartsList &partsList, bool alwaysSetDetails, double timeDeviationFactor=0.1, qint64 *differenceMs=nullptr) |
Transfer ground flag from parts list. More... | |
bool | isInterim () const |
Get flag indicating this is an interim position update. | |
CAircraftLights | guessLights () const |
Guessed lights. | |
CAltitude | getCorrectedAltitude (bool enableDragToGround=true, AltitudeCorrection *correction=nullptr) const |
Get altitude under consideration of ground elevation and ground flag. More... | |
CAltitude | getCorrectedAltitude (const physical_quantities::CLength ¢erOfGravity, bool enableDragToGround=true, AltitudeCorrection *correction=nullptr) const |
Get altitude under consideration of ground elevation and ground flag. More... | |
AltitudeCorrection | correctAltitude (bool enableDragToGround=true) |
Set the corrected altitude from CAircraftSituation::getCorrectedAltitude. | |
AltitudeCorrection | correctAltitude (const physical_quantities::CLength ¢erOfGravity=physical_quantities::CLength::null(), bool enableDragToGround=true) |
Set the corrected altitude from CAircraftSituation::getCorrectedAltitude. | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
![]() | |
void | marshallToDbus (QDBusArgument &arg, Tags...) const |
Marshall without begin/endStructure, for when composed within another object. | |
void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
Unmarshall without begin/endStructure, for when composed within another object. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
QJsonObject | toJson () const |
Cast to JSON object. | |
QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
Convenience function JSON as string. | |
void | convertFromJson (const QJsonObject &json) |
Assign from JSON object. | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
![]() | |
QString | toQString (bool i18n=false) const |
Cast as QString. | |
std::string | toStdString (bool i18n=false) const |
To std string. | |
QString | stringForStreaming () const |
String for streaming operators. | |
![]() | |
CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
Update by variant map. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
Compare for index. | |
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
Is given variant equal to value of property index? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
![]() | |
ICoordinateGeodetic ()=default | |
Ctor. | |
virtual | ~ICoordinateGeodetic () |
Destructor. | |
ICoordinateGeodetic (const ICoordinateGeodetic &)=default | |
Copy constructor. | |
ICoordinateGeodetic & | operator= (const ICoordinateGeodetic &)=default |
Copy assignment operator. | |
bool | equalNormalVectorDouble (const std::array< double, 3 > &otherVector) const |
Is equal? Epsilon considered. | |
bool | equalNormalVectorDouble (const ICoordinateGeodetic &otherCoordinate) const |
Is equal, epsilon considered? | |
QString | latitudeAsString () const |
Latitude as string. | |
QString | longitudeAsString () const |
Longitude as string. | |
QString | geodeticHeightAsString () const |
Height as string. | |
bool | isGeodeticHeightNull () const |
Geodetic height null? | |
bool | hasMSLGeodeticHeight () const |
Geodetic height not null and aviation::CAltitude::MeanSeaLevel. | |
physical_quantities::CLength | calculateGreatCircleDistance (const ICoordinateGeodetic &otherCoordinate) const |
Great circle distance. | |
bool | isWithinRange (const ICoordinateGeodetic &otherCoordinate, const physical_quantities::CLength &range) const |
Object within range? | |
physical_quantities::CAngle | calculateBearing (const ICoordinateGeodetic &otherCoordinate) const |
Initial bearing. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateGeodetic &compareValue) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
bool | isNaNVector () const |
Check values. | |
bool | isNaNVectorDouble () const |
Check values. | |
bool | isInfVector () const |
Check values. | |
bool | isInfVectorDouble () const |
Check values. | |
bool | isValidVectorRange () const |
Check values. | |
![]() | |
void | setTimeOffsetMs (qint64 offset) |
Milliseconds to add to timestamp for interpolation. | |
qint64 | getTimeOffsetMs () const |
Milliseconds to add to timestamp for interpolation. | |
bool | hasNonZeroOffsetTime () const |
Having a valid offset time. | |
void | addMsecsToOffsetTime (qint64 msToAdd) |
Adds a value to offset time. | |
QString | getTimeOffsetWithUnit () const |
Offset with unit. | |
qint64 | getAdjustedMSecsSinceEpoch () const |
Timestamp with offset added for interpolation. | |
void | setAdjustedMSecsSinceEpoch (qint64 adjustedTimeMs) |
Set timestamp with offset added for interpolation. | |
qint64 | getAdjustedTimeDifferenceMs (qint64 compareTime) const |
Time difference in ms (this -> compare) | |
QString | getTimestampAndOffset (bool formatted) const |
Timestamp and offset. | |
QString | getFormattedTimestampAndOffset (bool includeRawTimestamp) const |
Timestamp and offset. | |
bool | isNewerThanAdjusted (const ITimestampWithOffsetBased &otherTimestampObj) const |
Is this newer than other? | |
bool | isNewerThanAdjusted (qint64 mSecsSinceEpoch) const |
Is newer than epoch value? | |
bool | isOlderThanAdjusted (const ITimestampWithOffsetBased &otherTimestampObj) const |
Is this older than other? | |
bool | isOlderThanAdjusted (qint64 mSecsSinceEpoch) const |
Is this older than other? | |
![]() | |
QDateTime | getUtcTimestamp () const |
Get timestamp. | |
qint64 | getMSecsSinceEpoch () const |
Timestamp as ms value. | |
qint64 | getTimeDifferenceMs (qint64 compareTime) const |
Time difference in ms. | |
qint64 | getTimeDifferenceAbsMs (qint64 compareTime) const |
Time difference in ms. | |
qint64 | getTimeDifferenceToNowMs () const |
Time difference to now. | |
qint64 | getTimeDifferenceMs (const ITimestampBased &compare) const |
Time difference in ms. | |
qint64 | getAbsTimeDifferenceMs (qint64 compareTime) const |
Time difference in ms. | |
qint64 | getAbsTimeDifferenceMs (const ITimestampBased &compare) const |
Time difference in ms. | |
void | setTimestampToNull () |
Set to null. | |
void | setMSecsSinceEpoch (qint64 mSecsSinceEpoch) |
Timestamp as ms value. | |
void | setByYearMonthDayHourMinute (const QString &yyyyMMddhhmmss) |
Set by value such as "20141003231045". | |
void | setUtcTimestamp (const QDateTime ×tamp) |
Set timestamp. | |
bool | isNewerThan (const ITimestampBased &otherTimestampObj) const |
Is this newer than other? | |
bool | isNewerThan (qint64 mSecsSinceEpoch) const |
Is newer than epoch value? | |
bool | isOlderThan (const ITimestampBased &otherTimestampObj) const |
Is this older than other? | |
bool | isOlderThan (qint64 mSecsSinceEpoch) const |
Is this older than other? | |
bool | isOlderThanNowMinusOffset (int offsetMs) const |
Older than now-offset. | |
bool | isSame (const ITimestampBased &otherTimestampObj) const |
Same timestamp. | |
qint64 | msecsTo (const ITimestampBased &otherTimestampObj) const |
Time difference. | |
qint64 | absMsecsTo (const ITimestampBased &otherTimestampObj) const |
Time difference. | |
qint64 | msecsToNow () const |
Milliseconds to now. | |
void | setCurrentUtcTime () |
Set the current time as timestamp. | |
void | addMsecs (qint64 ms) |
Add the given number of milliseconds to the timestamp. | |
QString | getFormattedUtcTimestampHms () const |
As hh:mm:ss. | |
QString | getFormattedUtcTimestampHmsz () const |
As hh:mm:ss.zzz. | |
QString | getFormattedUtcTimestampHm () const |
As hh:mm. | |
QString | getFormattedUtcTimestampDhms () const |
As dd HH mm ss. | |
QString | getFormattedUtcTimestampMdhms () const |
As MM dd HH mm ss. | |
QString | getFormattedUtcTimestampMdhmsz () const |
As MM dd HH mm ss.zzz. | |
QString | getFormattedUtcTimestampYmdhms () const |
As yyyy MM dd HH mm ss. | |
QString | getFormattedUtcTimestampYmdhmsz () const |
As yyyy MM dd HH mm ss.zzz. | |
bool | hasValidTimestamp () const |
Valid timestamp? | |
Static Public Member Functions | |
static const QString & | altitudeCorrectionToString (AltitudeCorrection correction) |
Enum to string. | |
static bool | isCorrectedAltitude (AltitudeCorrection correction) |
Means corrected altitude? | |
static const QString & | gndElevationInfoToString (GndElevationInfo details) |
Enum to string. | |
static const physical_quantities::CLength & | deltaNearGround () |
Delta distance, near to ground. | |
static const CAircraftSituation & | null () |
Null situation. | |
static const physical_quantities::CLength & | defaultCG () |
A default CG if not other value is available. | |
static geo::CElevationPlane | interpolatedElevation (const CAircraftSituation &situation, const CAircraftSituation &oldSituation, const CAircraftSituation &newSituation, const physical_quantities::CLength &distance=physical_quantities::CLength::null()) |
Interpolate between the 2 situations for situation. More... | |
static const physical_quantities::CLength & | allowedAltitudeDeviation () |
Within this range deviation is so small we consider values "almost constant". | |
static void | registerMetadata () |
Register metadata. | |
Ground flag comparisons | |
static bool | isGfEqualOnGround (double oldGroundFactor, double newGroundFactor) |
Both on ground. | |
static bool | isGfEqualAirborne (double oldGroundFactor, double newGroundFactor) |
Both not on ground. | |
static bool | isGfStarting (double oldGroundFactor, double newGroundFactor) |
Aircraft is starting. | |
static bool | isGfLanding (double oldGroundFactor, double newGroundFactor) |
Aircraft is landing. | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
![]() | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QJsonObject &json) |
Get object from QJsonObject. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Get object from JSON string. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
Get object from JSON string. | |
![]() | |
static bool | isValidVector (const std::array< double, 3 > &v) |
Check values. | |
![]() | |
static bool | isAnyTimestampIndex (int index) |
Any of the timestamp indexes. | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled. | |
Static Public Attributes | |
static constexpr double | MaxDeltaElevationFt = 25.0 |
Threshold until we interpolate elevations. | |
Additional Inherited Members | |
![]() | |
CValueObject ()=default | |
Default constructor. | |
CValueObject (const CValueObject &)=default | |
Copy constructor. | |
CValueObject & | operator= (const CValueObject &)=default |
Copy assignment operator. | |
~CValueObject ()=default | |
Destructor. | |
CEmpty ()=default | |
Inheriting constructors. | |
CEmpty (const CEmpty &)=default | |
Inheriting constructors. | |
![]() | |
CEmpty ()=default | |
Protected default constructor. | |
CEmpty (const CEmpty &)=default | |
Protected copy constructor. | |
CEmpty & | operator= (const CEmpty &)=default |
Protected copy assignment operator. | |
~CEmpty ()=default | |
Non-virtual protected destructor. | |
![]() | |
ITimestampWithOffsetBased () | |
Constructor. | |
ITimestampWithOffsetBased (qint64 msSincePoch) | |
Constructor. | |
ITimestampWithOffsetBased (const QDateTime ×tamp) | |
Constructor. | |
QVariant | propertyByIndex (swift::misc::CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (swift::misc::CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ITimestampWithOffsetBased &compareValue) const |
Compare for index. More... | |
![]() | |
ITimestampBased () | |
Constructor. | |
ITimestampBased (qint64 msSincePoch) | |
Constructor. | |
ITimestampBased (const QDateTime ×tamp) | |
Constructor. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ITimestampBased &compareValue) const |
Compare for index. More... | |
void | updateMissingParts (const ITimestampBased &other) |
Update missing parts. | |
![]() | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled? | |
![]() | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled. | |
![]() | |
qint64 | m_timeOffsetMs = 0 |
offset time in ms | |
![]() | |
qint64 | m_timestampMSecsSinceEpoch = -1 |
timestamp value | |
Value object encapsulating information of an aircraft's situation.
Definition at line 50 of file aircraftsituation.h.
How was altitude corrected?
Enumerator | |
---|---|
Underflow | aircraft too low |
DraggedToGround | other scenery too high, but on ground |
NoElevation | no correction as there is no elevation |
Definition at line 81 of file aircraftsituation.h.
Where did we get elevation from?
Enumerator | |
---|---|
Test | unit test |
SituationChange | |
Extrapolated | extrapolated ("guessing") |
Average | average value of "nearby" situation CAircraftSituationList::averageElevationOfNonMovingAircraft |
Interpolated | interpolated between 2 elevations |
FromCache | from cache |
FromProvider | from swift::misc::simulation::ISimulationEnvironmentProvider |
Definition at line 92 of file aircraftsituation.h.
bool swift::misc::aviation::CAircraftSituation::adjustGroundFlag | ( | const CAircraftParts & | parts, |
bool | alwaysSetDetails, | ||
double | timeDeviationFactor = 0.1 , |
||
qint64 * | differenceMs = nullptr |
||
) |
Transfer ground flag from parts.
parts | containing the gnd flag |
alwaysSetDetails | mark as CAircraftSituation::InFromParts regardless of parts |
timeDeviationFactor | 0..1 (of offset time) small deviations from time are accepted |
differenceMs | returns time difference |
Definition at line 862 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::adjustGroundFlag | ( | const CAircraftPartsList & | partsList, |
bool | alwaysSetDetails, | ||
double | timeDeviationFactor = 0.1 , |
||
qint64 * | differenceMs = nullptr |
||
) |
Transfer ground flag from parts list.
partsList | containing the gnd flag |
alwaysSetDetails | mark as CAircraftSituation::InFromParts regardless of parts |
timeDeviationFactor | 0..1 (of offset time) small deviations from time are accepted |
differenceMs | returns time difference |
Definition at line 882 of file aircraftsituation.cpp.
int swift::misc::aviation::CAircraftSituation::comparePropertyByIndex | ( | CPropertyIndexRef | index, |
const CAircraftSituation & | compareValue | ||
) | const |
Compare for index.
Definition at line 338 of file aircraftsituation.cpp.
QString swift::misc::aviation::CAircraftSituation::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 117 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::equalPbh | ( | const CAircraftSituation & | other | ) | const |
Equal pitch, bank heading.
Definition at line 411 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::equalPbhAndVector | ( | const CAircraftSituation & | other | ) | const |
Equal PBH and vector.
Definition at line 417 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::equalPbhVectorAltitude | ( | const CAircraftSituation & | other | ) | const |
Equal PBH and vecto, plus altitude.
Definition at line 422 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::equalPbhVectorAltitudeElevation | ( | const CAircraftSituation & | other | ) | const |
Equal PBH and vecto, plus altitude/elevation.
Definition at line 429 of file aircraftsituation.cpp.
|
inlinevirtual |
Height, ellipsoidal or geodetic height (used in GPS)
This is approximately MSL (orthometric) height, aka altitude, aka elevation. The terms "geodetic height", "altitude", and "elevation" are interchangable. "Geodetic height" is the generic, context-free term for the vertical component of a position. This is commonly called "altitude" for objects that can move freely in the vertical component. By a similar convention, "elevation" is commonly used for objects that are fixed to the ground.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 210 of file aircraftsituation.h.
CAltitude swift::misc::aviation::CAircraftSituation::getCorrectedAltitude | ( | bool | enableDragToGround = true , |
CAircraftSituation::AltitudeCorrection * | correction = nullptr |
||
) | const |
Get altitude under consideration of ground elevation and ground flag.
Definition at line 677 of file aircraftsituation.cpp.
CAltitude swift::misc::aviation::CAircraftSituation::getCorrectedAltitude | ( | const physical_quantities::CLength & | centerOfGravity, |
bool | enableDragToGround = true , |
||
AltitudeCorrection * | correction = nullptr |
||
) | const |
Get altitude under consideration of ground elevation and ground flag.
Definition at line 683 of file aircraftsituation.cpp.
|
static |
Interpolate between the 2 situations for situation.
Definition at line 212 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::interpolateElevation | ( | const aviation::CAircraftSituation & | oldSituation, |
const aviation::CAircraftSituation & | newSituation | ||
) |
Interpolate "this" elevation from the two adjacent positions.
Definition at line 554 of file aircraftsituation.cpp.
|
inlinevirtual |
Latitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 174 of file aircraftsituation.h.
|
inlinevirtual |
Longitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 177 of file aircraftsituation.h.
|
inlinevirtual |
Normal vector.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 213 of file aircraftsituation.h.
|
inlinevirtual |
Normal vector with double precision.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 216 of file aircraftsituation.h.
QVariant swift::misc::aviation::CAircraftSituation::propertyByIndex | ( | CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 267 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::setGroundElevationChecked | ( | const geo::CElevationPlane & | elevationPlane, |
GndElevationInfo | info, | ||
bool | transferred = false |
||
) |
Set elevation of the ground directly beneath, but checked.
Definition at line 616 of file aircraftsituation.cpp.
void swift::misc::aviation::CAircraftSituation::setPropertyByIndex | ( | CPropertyIndexRef | index, |
const QVariant & | variant | ||
) |
Set property by index.
Definition at line 303 of file aircraftsituation.cpp.
bool swift::misc::aviation::CAircraftSituation::transferGroundElevationFromMe | ( | CAircraftSituation & | transferToSituation, |
const physical_quantities::CLength & | radius = geo::CElevationPlane::singlePointRadius() |
||
) | const |
Transfer from "this" situation to otherSituation
.
Definition at line 534 of file aircraftsituation.cpp.