6#ifndef SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLATOR_H
7#define SWIFT_MISC_SIMULATION_INTERPOLATION_INTERPOLATOR_H
31namespace swift::misc::simulation
61 uint32_t aircraftNumber);
71 QString getInterpolatorInfo()
const;
75 void resetLastInterpolation();
82 void markAsUnitTest();
103 bool doLogging()
const;
141 bool m_unitTest =
false;
148 bool initIniterpolationStepData(qint64 currentTimeSinceEpoch,
Status messages, e.g. from Core -> GUI.
Value object encapsulating information of aircraft's parts.
static const CAircraftParts & null()
NULL parts object.
Value object about changes in situations.
Value object encapsulating information of an aircraft's situation.
static const CAircraftSituation & null()
Null situation.
List of aircraft situations.
Value object encapsulating information of a callsign.
Physical unit length (length).
static const CLength & null()
Aircraft model (used by another pilot, my models on disk).
Value object for interpolator and rendering per callsign.
Record internal state of interpolator for debugging.
CInterpolationSetupAware()
Default constructor.
Base class for interpolating (calculate positions inbetween updates). One instance is responsible for...
const CStatusMessageList & getInterpolationMessages() const
Interpolation messages.
int m_partsToSituationGuessingRatio
ratio between parts guessing and situation interpolation
bool hasInterpolationMessages() const
Do we have interpolation messages.
int m_partsToSituationInterpolationRatio
ratio between parts and situation interpolation, 1..always, 2..every 2nd situation
qint64 m_situationsLastModified
when situations were last modified
aviation::CAircraftParts m_lastParts
latest parts
CInterpolator(const aviation::CCallsign &callsign, ISimulationEnvironmentProvider *simEnvProvider, IInterpolationSetupProvider *setupProvider, IRemoteAircraftProvider *remoteProvider, CInterpolationLogger *logger)
Constructor.
const physical_quantities::CLength & getModelCG() const
Center of gravity.
const aviation::CAircraftSituation & getLastInterpolatedSituation() const
Latest interpolation result.
static const QStringList & getLogCategories()
Log categories.
CInterpolationStatus m_currentInterpolationStatus
this step's situation status
physical_quantities::CLength m_currentSceneryOffset
calculated scenery offset if any
CInterpolationAndRenderingSetupPerCallsign m_currentSetup
used setup
CPartsStatus m_currentPartsStatus
this step's parts status
aviation::CAircraftSituation m_lastSituation
latest interpolation
qint64 m_situationsLastModifiedUsed
interpolant based on situations last updated
void attachLogger(CInterpolationLogger *logger)
Attach an observer to read the interpolator's state for debugging.
qint64 m_currentTimeMsSinceEpoch
current time
int m_interpolatedSituationsCounter
counter for each interpolated situations: used for statistics, every n-th interpolation ....
aviation::CAircraftSituationChange m_pastSituationsChange
situations change of provider (i.e.
CStatusMessageList m_interpolationMessages
interpolation messages
CPartsStatus m_lastPartsStatus
status for last parts, used when last parts are re-used because of m_partsToSituationInterpolationRat...
aviation::CAircraftSituationList m_currentSituations
current situations obtained by remoteAircraftSituationsAndChange
const aviation::CCallsign m_callsign
corresponding callsign
bool hasAttachedLogger() const
Is logger attached?
virtual const IInterpolant & getInterpolant(SituationLog &log)=0
Get the interpolant for the given time point.
qint64 m_lastInvalidLogTs
last invalid situation timestamp
int m_invalidSituations
mainly when there are no new situations
CAircraftModel m_model
corresponding model (required for CG)
int getInvalidSituationsCount() const
Get count of invalid situations.
Linear interpolator, calculation inbetween positions.
Cubic spline interpolator.
CRemoteAircraftAware()
Default constructor.
CSimulationEnvironmentAware()
Default constructor.
Direct in memory access to interpolation setup, normally implemented by simulator.
Direct thread safe in memory access to remote aircraft.
Direct in memory access to elevation data.
Log entry for situation interpolation.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.