Ref T261, interpolator adjustments

* using interface IInterpolant, renamed to CInterpolant for concrete implmentation
* CInterpolatorPBH has itws own file now, is included
* linear interpolator only re-calculates interpolant when needed (same as spline interpolator)
This commit is contained in:
Klaus Basan
2018-05-06 03:06:56 +02:00
committed by Roland Winklmeier
parent ef72cf7cd4
commit bac3d14d50
7 changed files with 145 additions and 120 deletions

View File

@@ -41,9 +41,9 @@ namespace BlackMisc
//! Interpolator, calculation inbetween positions
template <typename Derived>
class CInterpolator :
public CSimulationEnvironmentAware,
public CInterpolationSetupAware,
public CRemoteAircraftAware
protected CSimulationEnvironmentAware,
protected CInterpolationSetupAware,
protected CRemoteAircraftAware
{
public:
//! Log categories
@@ -109,13 +109,17 @@ namespace BlackMisc
//! \sa BlackMisc::Aviation::CAircraftSituation::setOnGroundFromGroundFactorFromInterpolation
static double groundInterpolationFactor();
const Aviation::CCallsign m_callsign; //!< corresponding callsign
CAircraftModel m_model; //!< corresponding model
const Aviation::CCallsign m_callsign; //!< corresponding callsign
Aviation::CAircraftSituation m_lastInterpolation { Aviation::CAircraftSituation::null() }; //!< latest interpolation
Aviation::CAircraftSituationChange m_situationChange; //!< situations change
PhysicalQuantities::CLength m_lastSceneryOffset = PhysicalQuantities::CLength::null();
qint64 m_situationsLastModifiedUsed { -1 }; //!< based on situations last updated
int m_interpolatedSituationsCounter = 0; //!< counter for each interpolated situations: statistics, every n-th interpolation ....
//! Get situations and calculate change, also correct altitudes if applicable
Aviation::CAircraftSituationList remoteAircraftSituationsAndChange(bool useSceneryOffset);
//! Verify gnd flag, times, ... true means "OK"
bool verifyInterpolationSituations(const Aviation::CAircraftSituation &oldest, const Aviation::CAircraftSituation &newer, const Aviation::CAircraftSituation &latest,
const CInterpolationAndRenderingSetupPerCallsign &setup = CInterpolationAndRenderingSetupPerCallsign::null());