mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
refs #852 To avoid sudden movements, don't bother trying to interpolate
when we have less than two position updates.
This commit is contained in:
@@ -333,6 +333,8 @@ namespace XBus
|
||||
{
|
||||
case xpmpDataType_Position:
|
||||
{
|
||||
if (plane->situations.size() < 3) { return xpmpData_Unavailable; } // avoid sudden movements when a pilot connects
|
||||
|
||||
BlackMisc::Simulation::IInterpolator::InterpolationStatus status;
|
||||
const auto situation = m_interpolator->getInterpolatedSituation(plane->situations, -1, plane->hints(m_interpolator), status);
|
||||
if (! status.didInterpolationSucceed()) { return xpmpData_Unavailable; }
|
||||
|
||||
Reference in New Issue
Block a user