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:
Mathew Sutcliffe
2017-01-14 04:01:24 +00:00
parent 6cabdf5b77
commit a3212ab37d

View File

@@ -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; }