mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T261, further unify interpolator handling
* return interpolation results parts/situation in one step * base class init for each interpolation step, less redundant code * removed old interpolation/parts function * adjusted unit tests and simulator objects (such as SimObject)
This commit is contained in:
committed by
Roland Winklmeier
parent
bac3d14d50
commit
0808cdb223
@@ -172,14 +172,13 @@ namespace BlackSimPlugin
|
||||
Q_UNUSED(event);
|
||||
|
||||
if (m_clientStatus == Disconnected) { return; }
|
||||
CInterpolationStatus status;
|
||||
CInterpolationAndRenderingSetupPerCallsign setup = this->simulator()->getInterpolationSetupPerCallsignOrDefault(m_callsign);
|
||||
const CAircraftSituation situation = m_interpolator.getInterpolatedSituation(-1, setup, status);
|
||||
const CInterpolationAndRenderingSetupPerCallsign setup = this->simulator()->getInterpolationSetupConsolidated(m_callsign);
|
||||
const CInterpolationResult result = m_interpolator.getInterpolation(QDateTime::currentMSecsSinceEpoch(), setup);
|
||||
|
||||
// Test only for successful position. FS9 requires constant positions
|
||||
if (!status.hasValidSituation()) { return; }
|
||||
if (!result.getInterpolationStatus().hasValidSituation()) { return; }
|
||||
|
||||
sendMultiplayerPosition(situation);
|
||||
sendMultiplayerPosition(result);
|
||||
sendMultiplayerParamaters();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user