mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
refs #570 Each CAircraftSituation can have its own time offset, instead of a hardcoded 6 seconds.
This commit is contained in:
@@ -1113,6 +1113,12 @@ namespace BlackCore
|
||||
|
||||
// check sort order
|
||||
Q_ASSERT_X(l.size() < 2 || l[0].getMSecsSinceEpoch() >= l[1].getMSecsSinceEpoch(), Q_FUNC_INFO, "wrong sort order");
|
||||
|
||||
// a full position update received after an interim position update should use the time offset of the interim position
|
||||
if (l.size() >= 2 && (l[0].isInterim() || l[1].isInterim()))
|
||||
{
|
||||
l[0].setTimeOffsetMs(std::min(l[0].getTimeOffsetMs(), l[1].getTimeOffsetMs()));
|
||||
}
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::storeAircraftParts(const CCallsign &callsign, const CAircraftParts &parts)
|
||||
|
||||
Reference in New Issue
Block a user