From f8bef4aeab3285600cadb4bd2f8ed2949c36d7f2 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Mon, 15 Jan 2024 21:14:57 +0100 Subject: [PATCH] Revert "Issue #93 Reduce update offset for 5 Hz updates and rename member" This reverts commit 8dc206d62ba476cea35368685b94f39c63e5e1d8. --- src/blackcore/fsd/fsdclient.cpp | 4 ++-- src/blackmisc/network/fsdsetup.h | 2 +- src/blackmisc/simulation/interpolatorspline.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blackcore/fsd/fsdclient.cpp b/src/blackcore/fsd/fsdclient.cpp index 9b7994f5b6..839c947b9a 100644 --- a/src/blackcore/fsd/fsdclient.cpp +++ b/src/blackcore/fsd/fsdclient.cpp @@ -1928,9 +1928,9 @@ namespace BlackCore::Fsd const qint64 avgTimeMs = this->averageOffsetTimeMs(callsign, count, 3); // latest average qint64 offsetTime = CFsdSetup::c_positionTimeOffsetMsec; - if (avgTimeMs < CFsdSetup::c_minimumPositionTimeOffsetMsec && count >= 3) + if (avgTimeMs < CFsdSetup::c_interimPositionTimeOffsetMsec && count >= 3) { - offsetTime = CFsdSetup::c_minimumPositionTimeOffsetMsec; + offsetTime = CFsdSetup::c_interimPositionTimeOffsetMsec; } return m_additionalOffsetTime + offsetTime; diff --git a/src/blackmisc/network/fsdsetup.h b/src/blackmisc/network/fsdsetup.h index 299a5cdf73..0514c1cea6 100644 --- a/src/blackmisc/network/fsdsetup.h +++ b/src/blackmisc/network/fsdsetup.h @@ -60,7 +60,7 @@ namespace BlackMisc::Network //! Offset times basically telling when to expect the next value from network plus some reserve //! \remark related to CNetworkVatlib::c_updatePostionIntervalMsec / c_updateInterimPostionIntervalMsec static constexpr qint64 c_positionTimeOffsetMsec = 6000; //!< offset time for received position updates Ref T297 - static constexpr qint64 c_minimumPositionTimeOffsetMsec = 700; //!< offset time for vatsim high frequency position updates + static constexpr qint64 c_interimPositionTimeOffsetMsec = 1500; //!< offset time for received interim position updates Ref T297 //! @} //! Default constructor. diff --git a/src/blackmisc/simulation/interpolatorspline.cpp b/src/blackmisc/simulation/interpolatorspline.cpp index e6d6bc0fed..f1de92ba23 100644 --- a/src/blackmisc/simulation/interpolatorspline.cpp +++ b/src/blackmisc/simulation/interpolatorspline.cpp @@ -126,7 +126,7 @@ namespace BlackMisc::Simulation } // set some default values - const qint64 os = qMax(CFsdSetup::c_minimumPositionTimeOffsetMsec, m_s[2].getTimeOffsetMs()); + const qint64 os = qMax(CFsdSetup::c_interimPositionTimeOffsetMsec, m_s[2].getTimeOffsetMs()); m_s[0].addMsecs(-os); // oldest, Ref T297 default offset time to fill data m_s[2].addMsecs(os); // latest, Ref T297 default offset time to fill data if (m_currentSituations.isEmpty()) { return false; }