mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T270, interpolator optimization by passing aircraft number
Rational: Except for FS9 we interpolate all aircraft in one loop at the same time. This can cause that some steps are always done at the same time for all aircraft of that loop. By passing the number we can more equally distribute such tasks, avoiding peaks.
This commit is contained in:
@@ -103,7 +103,7 @@ namespace BlackMisc
|
||||
// m_s[0] .. oldest -> m_[2] .. latest
|
||||
// general idea, we interpolate from current situation -> latest situation
|
||||
|
||||
if (m_lastInterpolation.isNull())
|
||||
if (m_lastSituation.isNull())
|
||||
{
|
||||
if (!m_currentSituations.isEmpty())
|
||||
{
|
||||
@@ -117,7 +117,7 @@ namespace BlackMisc
|
||||
}
|
||||
else
|
||||
{
|
||||
m_s[0] = m_s[1] = m_s[2] = m_lastInterpolation; // current
|
||||
m_s[0] = m_s[1] = m_s[2] = m_lastSituation; // current
|
||||
m_s[0].addMsecs(-CFsdSetup::c_positionTimeOffsetMsec); // oldest
|
||||
m_s[2].addMsecs(CFsdSetup::c_positionTimeOffsetMsec); // latest
|
||||
if (m_currentSituations.isEmpty()) { return true; }
|
||||
|
||||
Reference in New Issue
Block a user