mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
Ref T231, Ref T236, Ref T238 improvements of interpolator
* keep last interpolated sitation, removed m_isFirstInterpolation * allow to obtain the old/new situation * transfer of elevations to newer situations
This commit is contained in:
@@ -43,13 +43,13 @@ namespace BlackMisc
|
||||
return c;
|
||||
}
|
||||
|
||||
int CAircraftSituationList::setGroundElevationChecked(const CElevationPlane &elevationPlane, qint64 newerThan, bool ignoreNullValues, bool overrideExisting)
|
||||
int CAircraftSituationList::setGroundElevationChecked(const CElevationPlane &elevationPlane, qint64 newerThanAdjustedMs, bool ignoreNullValues, bool overrideExisting)
|
||||
{
|
||||
if (ignoreNullValues && elevationPlane.isNull()) { return 0; }
|
||||
int c = 0;
|
||||
for (CAircraftSituation &s : *this)
|
||||
{
|
||||
if (s.getMSecsSinceEpoch() <= newerThan) { continue; }
|
||||
if (s.getAdjustedMSecsSinceEpoch() <= newerThanAdjustedMs) { continue; }
|
||||
const bool set = s.setGroundElevationChecked(elevationPlane, ignoreNullValues, overrideExisting);
|
||||
if (set) { c++; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user