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

@@ -182,7 +182,7 @@ namespace BlackCore
//! \copydoc BlackMisc::Simulation::ISimulationEnvironmentProvider::requestElevation
//! \remark needs to be overridden if the concrete driver supports such an option
virtual bool requestElevation(const BlackMisc::Geo::ICoordinateGeodetic &reference) const override;
virtual bool requestElevation(const BlackMisc::Geo::ICoordinateGeodetic &reference, const BlackMisc::Aviation::CCallsign &callsign) override;
//! \copydoc BlackMisc::IProvider::asQObject
virtual QObject *asQObject() override { return this; }
@@ -235,6 +235,9 @@ namespace BlackCore
//! Request a console message (whatever the console maybe)
void requestUiConsoleMessage(const QString &driverMessage, bool clear);
//! A requested elevation has been received
void receivedRequestedElevation(const BlackMisc::Geo::CElevationPlane &plane, const BlackMisc::Aviation::CCallsign &callsign);
protected:
//! Default constructor
ISimulator(const BlackMisc::Simulation::CSimulatorPluginInfo &pluginInfo,
@@ -268,6 +271,9 @@ namespace BlackCore
//! Set elevation and CG in the providers
void rememberElevationAndCG(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Geo::CElevationPlane &elevation, const BlackMisc::PhysicalQuantities::CLength &cg);
//! A requested elevation has been received
virtual void callbackReceivedRequestedElevation(const BlackMisc::Geo::CElevationPlane &plane, const BlackMisc::Aviation::CCallsign &callsign);
//! Emit the combined status
//! \param oldStatus optionally one can capture and provide the old status for comparison. In case of equal status values no signal will be sent
//! \sa simulatorStatusChanged;