mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
refs #691 Make sure to set status correctly in interpolator.
This commit is contained in:
@@ -60,6 +60,8 @@ namespace BlackMisc
|
|||||||
// interpolation situations
|
// interpolation situations
|
||||||
CAircraftSituation oldSituation;
|
CAircraftSituation oldSituation;
|
||||||
CAircraftSituation newSituation;
|
CAircraftSituation newSituation;
|
||||||
|
status.interpolationSucceeded = true;
|
||||||
|
status.changedPosition = true; //! \todo efficiently determine whether the position has changed
|
||||||
|
|
||||||
// latest first, now 00:20 split time
|
// latest first, now 00:20 split time
|
||||||
// time pos
|
// time pos
|
||||||
@@ -93,7 +95,6 @@ namespace BlackMisc
|
|||||||
|
|
||||||
CAircraftSituation currentSituation(oldSituation);
|
CAircraftSituation currentSituation(oldSituation);
|
||||||
CCoordinateGeodetic currentPosition;
|
CCoordinateGeodetic currentPosition;
|
||||||
status.interpolationSucceeded = true;
|
|
||||||
|
|
||||||
// Time between start and end packet
|
// Time between start and end packet
|
||||||
double deltaTime = std::abs(oldSituation.getAdjustedMSecsSinceEpoch() - newSituation.getAdjustedMSecsSinceEpoch());
|
double deltaTime = std::abs(oldSituation.getAdjustedMSecsSinceEpoch() - newSituation.getAdjustedMSecsSinceEpoch());
|
||||||
@@ -179,7 +180,6 @@ namespace BlackMisc
|
|||||||
currentSituation.setGroundSpeed((newSituation.getGroundSpeed() - oldSituation.getGroundSpeed())
|
currentSituation.setGroundSpeed((newSituation.getGroundSpeed() - oldSituation.getGroundSpeed())
|
||||||
* simulationTimeFraction
|
* simulationTimeFraction
|
||||||
+ oldSituation.getGroundSpeed());
|
+ oldSituation.getGroundSpeed());
|
||||||
status.changedPosition = true;
|
|
||||||
return currentSituation;
|
return currentSituation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user