mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T259, Ref T243 access to last interpolated situation to check if near ground
This commit is contained in:
@@ -146,6 +146,12 @@ namespace BlackSimPlugin
|
||||
return m_interpolator->getInterpolatedParts(currentTimeSinceEpoc, setup, partsStatus, log);
|
||||
}
|
||||
|
||||
const CAircraftSituation &CSimConnectObject::getLastInterpolatedSituation() const
|
||||
{
|
||||
if (!m_interpolator) { return CAircraftSituation::null(); }
|
||||
return m_interpolator->getLastInterpolatedSituation();
|
||||
}
|
||||
|
||||
bool CSimConnectObjects::setSimConnectObjectIdForRequestId(DWORD requestId, DWORD objectId, bool resetSentParts)
|
||||
{
|
||||
// First check, if this request id belongs to us
|
||||
|
||||
@@ -161,6 +161,9 @@ namespace BlackSimPlugin
|
||||
const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup,
|
||||
BlackMisc::Simulation::CPartsStatus &partsStatus, bool log) const;
|
||||
|
||||
//! Last interpolated situation
|
||||
const BlackMisc::Aviation::CAircraftSituation &getLastInterpolatedSituation() const;
|
||||
|
||||
//! Interpolator
|
||||
BlackMisc::Simulation::CInterpolatorMulti *getInterpolator() const { return m_interpolator.data(); }
|
||||
|
||||
|
||||
@@ -485,6 +485,9 @@ namespace BlackSimPlugin
|
||||
}
|
||||
|
||||
// CElevationPlane: deg, deg, feet
|
||||
// we only remember near ground
|
||||
if (simObject.getLastInterpolatedSituation().canLikelySkipNearGroundInterpolation()) { return; }
|
||||
|
||||
CElevationPlane elevation(remoteAircraftData.latitudeDeg, remoteAircraftData.longitudeDeg, remoteAircraftData.elevationFt);
|
||||
elevation.setSinglePointRadius();
|
||||
this->rememberElevationAndCG(simObject.getCallsign(), elevation, CLength(remoteAircraftData.cgToGroundFt, CLengthUnit::ft()));
|
||||
|
||||
Reference in New Issue
Block a user