Ref T260, changed elevation handling in provider, simulator and FSX common driver

* split functions, added findClosestElevationWithinRangeOrRequest
* obtain elevation ids (separate ids are easier to track)
* also added experimental "physicallyAddAITerrainProbe" (FSX) for the FSX elevation probing
* callback / signal when requested elevation is received (async)
This commit is contained in:
Klaus Basan
2018-04-07 04:41:22 +02:00
committed by Roland Winklmeier
parent dcc348c9d9
commit 6061a61d50
12 changed files with 268 additions and 48 deletions

View File

@@ -38,11 +38,15 @@ namespace BlackMisc
//! Find closest elevation
//! \threadsafe
Geo::CElevationPlane findClosestElevationWithinRange(const Geo::ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range, bool autoRequest = false) const;
Geo::CElevationPlane findClosestElevationWithinRange(const Geo::ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range) const;
//! Find closest elevation
//! \threadsafe
Geo::CElevationPlane findClosestElevationWithinRangeOrRequest(const Geo::ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range, const Aviation::CCallsign &callsign);
//! Request elevation, there is no guaranteed the requested elevation will be available in the provider
//! \threadsafe
virtual bool requestElevation(const Geo::ICoordinateGeodetic &reference) const = 0;
virtual bool requestElevation(const Geo::ICoordinateGeodetic &reference, const Aviation::CCallsign &callsign) = 0;
//! Elevations found/missed statistics
//! \threadsafe
@@ -146,10 +150,13 @@ namespace BlackMisc
void setSimulationEnvironmentProvider(ISimulationEnvironmentProvider *provider) { this->setProvider(provider); }
//! \copydoc ISimulationEnvironmentProvider::findClosestElevationWithinRange
Geo::CElevationPlane findClosestElevationWithinRange(const Geo::ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range, bool autoRequest = false) const;
Geo::CElevationPlane findClosestElevationWithinRange(const Geo::ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range) const;
//! \copydoc ISimulationEnvironmentProvider::findClosestElevationWithinRange
bool requestElevation(const Geo::ICoordinateGeodetic &reference) const;
//! \copydoc ISimulationEnvironmentProvider::findClosestElevationWithinRangeOrRequest
Geo::CElevationPlane findClosestElevationWithinRangeOrRequest(const Geo::ICoordinateGeodetic &reference, const PhysicalQuantities::CLength &range, const Aviation::CCallsign &callsign);
//! \copydoc ISimulationEnvironmentProvider::requestElevation
bool requestElevation(const Geo::ICoordinateGeodetic &reference, const Aviation::CCallsign &callsign);
//! \copydoc ISimulationEnvironmentProvider::getElevationsFoundMissed
QPair<int, int> getElevationsFoundMissed() const;