6 #ifndef SWIFT_MISC_AVIATION_AIRCRAFTSITUATIONCHANGE_H
7 #define SWIFT_MISC_AVIATION_AIRCRAFTSITUATIONCHANGE_H
29 class CAircraftSituation;
30 class CAircraftSituationList;
41 IndexCallsign = CPropertyIndexRef::GlobalIndexCAircraftSituationChange,
47 IndexConstNotOnGround,
49 IndexJustTouchingDown,
51 IndexContainsPushBack,
64 SmallAGLDeviationNearGround
73 bool isVtol,
bool alreadySortedLatestFirst =
false,
74 bool calcStdDeviations =
false);
80 bool isNull()
const {
return m_situationsCount < 2; }
143 return guessedSceneryDeviationToString(this->getSceneryDeviationHint());
147 bool hasSceneryDeviation()
const;
150 bool hasElevationDevWithinAllowedRange()
const;
153 bool hasAltitudeDevWithinAllowedRange()
const;
156 QString convertToQString(
bool i18n =
false)
const;
175 static const QString &guessedSceneryDeviationToString(GuessedSceneryDeviation hint);
182 void setSceneryDeviationHint(GuessedSceneryDeviation hint)
184 m_guessedSceneryDeviationHint =
static_cast<int>(hint);
194 int m_situationsCount = -1;
195 CCallsign m_correspondingCallsign;
197 qint64 m_oldestTimestampMSecsSinceEpoch = -1;
198 qint64 m_oldestAdjustedTimestampMSecsSinceEpoch = -1;
199 qint64 m_latestAdjustedTimestampMSecsSinceEpoch = -1;
200 bool m_constAscending =
false;
201 bool m_constDescending =
false;
202 bool m_constOnGround =
false;
203 bool m_wasOnGround =
false;
204 bool m_constNotOnGround =
false;
205 bool m_wasNotOnGround =
false;
206 bool m_justTakeoff =
false;
207 bool m_justTouchdown =
false;
208 bool m_rotateUp =
false;
209 bool m_constAccelerating =
false;
210 bool m_constDecelerating =
false;
211 bool m_containsPushBack =
false;
212 int m_guessedSceneryDeviationHint =
static_cast<int>(NoDeviationInfo);
229 CAircraftSituationChange,
QPair< CAltitude, CAltitude > CAltitudePair
Pair of altitude.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Value object about changes in situations.
ColumnIndex
Properties by index.
int getSituationsCount() const
Basend on n situations.
const physical_quantities::CLength & getGuessedSceneryDeviation() const
Scnenery deviation (if it can be calculated, otherwise physical_quantities::CLength::null)
bool containsPushBack() const
Contains any push back?
const QString & getSceneryDeviationHintAsString() const
Scenery deviation hint hint as string.
bool isConstDescending() const
Constantly descending?
bool isConstAscending() const
Constantly ascending?
CAltitudePair getElevationStdDevAndMean() const
Elevation standard deviation and mean.
bool wasConstNotOnGround() const
Was not on ground (without latest situation)?
bool isConstAccelerating() const
Constantly accelerating?
bool isJustTakingOff() const
Is just taking off?
CAircraftSituationChange()=default
Default constructor.
const CCallsign & getCallsign() const
Get callsign.
GuessedSceneryDeviation
Hint about the guessed scenery deviation.
@ AllOnGround
based on all situations on ground
@ WasOnGround
was on ground except last situation
bool isConstDecelarating() const
Constantly decelarating?
bool isRotatingUp() const
Is rotating up?
bool isJustTouchingDown() const
Is just touching down?
bool isConstOnGround() const
Are all situations on ground?
bool isConstNotOnGround() const
Are all situations not on ground?
GuessedSceneryDeviation getSceneryDeviationHint() const
Scenery deviation hint.
physical_quantities::CLength getGuessedSceneryDeviationCG() const
Get scenery deviation under consideration of CG.
bool wasConstOnGround() const
Was on ground (without latest situation)?
Value object encapsulating information of an aircraft's situation.
List of aircraft situations.
static const CAltitude & null()
Null altitude (MSL)
Value object encapsulating information of a callsign.
Physical unit angle (radians, degrees)
Physical unit length (length)
static const CSpeed & null()
NULL PQ.
Aircraft model (used by another pilot, my models on disk)
Free functions in swift::misc.
void registerMetadata()
Register all relevant metadata in Misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...