mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T259, Ref T243 interpolator changes
* interpolators use providers for client/situations/parts/ground elevation * interpolators do no longer use own situations/parts, but those from provider * interpolators are no longer QObjects (as it is not needed) * use gnd flag from situation for gnd interpolation, there is no longer a parts gnd flag interpolation * guess parts during interpolation * changed iterators to m_s[i] as it makes clearer which values are used ** the flag is transferred from parts -> situation in airspace monitor ** if the other client already provides and gnd.flag in situation this also works * adjusted logging * use providers in unit tests / adjusted tests * improved situation verification/assert
This commit is contained in:
committed by
Roland Winklmeier
parent
5c6a37c669
commit
cd1ce37ec3
@@ -29,13 +29,12 @@ namespace BlackMisc
|
||||
//! Linear interpolator, calculation inbetween positions
|
||||
class BLACKMISC_EXPORT CInterpolatorLinear : public CInterpolator<CInterpolatorLinear>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CInterpolatorLinear(const BlackMisc::Aviation::CCallsign &callsign, QObject *parent = nullptr) :
|
||||
CInterpolator("CInterpolatorLinear", callsign, parent)
|
||||
{}
|
||||
CInterpolatorLinear(const Aviation::CCallsign &callsign,
|
||||
ISimulationEnvironmentProvider *p1, IInterpolationSetupProvider *p2, IRemoteAircraftProvider *p3,
|
||||
CInterpolationLogger *logger = nullptr) :
|
||||
CInterpolator(callsign, p1, p2, p3, logger) {}
|
||||
|
||||
//! Linear function that performs the actual interpolation
|
||||
class Interpolant
|
||||
@@ -48,10 +47,7 @@ namespace BlackMisc
|
||||
//! @}
|
||||
|
||||
//! Perform the interpolation
|
||||
//! @{
|
||||
Geo::CCoordinateGeodetic interpolatePosition(const CInterpolationAndRenderingSetupPerCallsign &setup) const;
|
||||
Aviation::CAltitude interpolateAltitude(const CInterpolationAndRenderingSetupPerCallsign &setup) const;
|
||||
//! @}
|
||||
Aviation::CAircraftSituation interpolatePositionAndAltitude(const Aviation::CAircraftSituation &situation) const;
|
||||
|
||||
//! Interpolator for pitch, bank, heading, groundspeed
|
||||
const CInterpolatorPbh &pbh() const { return m_pbh; }
|
||||
@@ -71,7 +67,7 @@ namespace BlackMisc
|
||||
Aviation::CAircraftSituation m_newSituation;
|
||||
double m_simulationTimeFraction = 0.0; //!< 0..1
|
||||
qint64 m_interpolatedTime = 0; //!< "Real time "of interpolated situation
|
||||
const CInterpolatorPbh m_pbh;
|
||||
const CInterpolatorPbh m_pbh; //!< pitch, bank, ground speed and heading
|
||||
};
|
||||
|
||||
//! Get the interpolant for the given time point
|
||||
|
||||
Reference in New Issue
Block a user