refactor: Move PBH interpolator to inidivdual Interpolants

This allows each interpolant to specify on its own which PBH
interpolator should be used. Currently only the linear PBH interpolator
is available, but another PBH interpolator will be added for velocity.

This removes some protected data from the IInterpolator interface as well,
which conforms to C++ Core Guideline C.113 ("Avoid protected data").
This commit is contained in:
Lars Toenning
2024-01-09 22:14:14 +01:00
parent e247f20482
commit 2f3e4fee1e
5 changed files with 13 additions and 11 deletions

View File

@@ -77,10 +77,13 @@ namespace BlackMisc::Simulation
//! \private UNIT tests/ASSERT only
const PosArray &getPa() const { return m_pa; }
CInterpolatorPbh pbh() const { return m_pbh; }
private:
PosArray m_pa; //!< current positions array, latest values last
PhysicalQuantities::CLengthUnit m_altitudeUnit;
qint64 m_currentTimeMsSinceEpoc { -1 };
CInterpolatorPbh m_pbh; //!< the used PBH interpolator
};
//! Strategy used by CInterpolator::getInterpolatedSituation