|
swift
|
Direct in memory access to elevation data. More...
Public Member Functions | |
| geo::CCoordinateGeodeticList | getAllElevationCoordinates () const |
| All remembered coordinates. More... | |
| geo::CCoordinateGeodeticList | getElevationCoordinatesOnGround () const |
| All remembered coordinates. More... | |
| geo::CElevationPlane | averageElevationOfOnGroundAircraft (const aviation::CAircraftSituation &reference, const physical_quantities::CLength &range, int minValues, int sufficientValues) const |
| Average elevation of "on ground" cached values. More... | |
| aviation::CAltitude | highestElevation () const |
| Highest elevation. More... | |
| geo::CElevationPlane | findClosestElevationWithinRange (const geo::ICoordinateGeodetic &reference, const physical_quantities::CLength &range) const |
| Find closest elevation (or return NULL) More... | |
| geo::CElevationPlane | findClosestElevationWithinRangeOrRequest (const geo::ICoordinateGeodetic &reference, const physical_quantities::CLength &range, const aviation::CCallsign &callsign) |
| Find closest elevation or request elevation. More... | |
| virtual bool | requestElevation (const geo::ICoordinateGeodetic &reference, const aviation::CCallsign &callsign)=0 |
| Request elevation, there is no guarantee the requested elevation will be available in the provider. More... | |
| bool | requestElevationBySituation (const swift::misc::aviation::CAircraftSituation &situation) |
| Request elevation, there is no guarantee the requested elevation will be available in the provider. More... | |
| QPair< int, int > | getElevationsFoundMissed () const |
| Elevations found/missed statistics. More... | |
| QPair< qint64, qint64 > | getElevationRequestTimes () const |
| The elevation request times. More... | |
| QString | getElevationsFoundMissedInfo () const |
| Elevations found/missed statistics info as string. More... | |
| QString | getElevationRequestTimesInfo () const |
| Elevation request times. More... | |
| CSimulatorPluginInfo | getSimulatorPluginInfo () const |
| Get the represented plugin. More... | |
| CSimulatorInfo | getSimulatorInfo () const |
| Get the represented simulator. More... | |
| QString | getSimulatorNameAndVersion () const |
| Version and simulator details info. More... | |
| CAircraftModel | getDefaultModel () const |
| Default model. More... | |
| aviation::CLengthPerCallsign | getSimulatorCGsPerCallsign () const |
| All CGs per callsign. More... | |
| QHash< QString, physical_quantities::CLength > | getSimulatorCGsPerModelString () const |
| All CGs per modelstring. More... | |
| physical_quantities::CLength | getSimulatorCG (const aviation::CCallsign &callsign) const |
| Get CG per callsign, NULL if not found. More... | |
| physical_quantities::CLength | getSimulatorOrDbCG (const aviation::CCallsign &callsign, const physical_quantities::CLength &dbCG) const |
| Get CG per callsign, NULL if not found. More... | |
| physical_quantities::CLength | getSimulatorCGPerModelString (const QString &modelString) const |
| Get CG per model string, NULL if not found. More... | |
| physical_quantities::CLength | getSimulatorOrDbCGPerModelString (const QString &modelString, const physical_quantities::CLength &dbCG) const |
| Get CG per model string, NULL if not found. More... | |
| physical_quantities::CLength | overriddenCGorDefault (const physical_quantities::CLength &defaultCG, const QString &modelString) const |
| Return the overridden CG value or the given default CG value. More... | |
| bool | hasSimulatorCG (const aviation::CCallsign &callsign) const |
| Has a CG? More... | |
| bool | hasSameSimulatorCG (const physical_quantities::CLength &cg, const aviation::CCallsign &callsign) const |
| Has the same CG? More... | |
| int | setMaxElevationsRemembered (int max) |
| Set number of elevations kept. More... | |
| int | getMaxElevationsRemembered () const |
| Get number of max. number of elevations. More... | |
| void | resetSimulationEnvironmentStatistics () |
| Reset statistics. More... | |
| bool | cleanElevationValues (const aviation::CAircraftSituation &reference, const physical_quantities::CLength &keptRange, bool forced=false) |
| Remove cached elevations outside range, "forced" cleans always, otherwise only if max.values are reached. More... | |
| int | removeElevationValues (const aviation::CAircraftSituation &reference, const physical_quantities::CLength &removeRange) |
| Remove cached elevations inside range,. More... | |
Public Member Functions inherited from swift::misc::IProvider | |
| virtual | ~IProvider ()=default |
| Dtor. | |
| IProvider (const IProvider &)=delete | |
| Copy constructor. | |
| IProvider & | operator= (const IProvider &)=delete |
| Copy assignment operator. | |
| virtual QObject * | asQObject () |
| Return as QObject. | |
Protected Member Functions | |
| ISimulationEnvironmentProvider (const CSimulatorPluginInfo &pluginInfo) | |
| Ctor. | |
| ISimulationEnvironmentProvider (const CSimulatorPluginInfo &pluginInfo, const settings::CSimulatorSettings &settings, bool supportElevation, bool supportCG) | |
| Ctor. | |
| geo::CCoordinateGeodeticList | getAllElevationCoordinates (int &maxRemembered) const |
| All remembered coordiantes plus max.remembered ground situations. More... | |
| void | setNewPluginInfo (const CSimulatorPluginInfo &info, const settings::CSimulatorSettings &settings, const CAircraftModel &defaultModel) |
| New plugin info and default model. More... | |
| void | setNewPluginInfo (const CSimulatorPluginInfo &info, const settings::CSimulatorSettings &settings) |
| New plugin info and default model. More... | |
| void | setSimulatorDetails (const QString &name, const QString &details, const QString &version) |
| Set version and simulator details from running simulator. More... | |
| QString | getSimulatorName () const |
| Simulator name as set from the running simulator. More... | |
| QString | getSimulatorVersion () const |
| Simulator version as set from the running simulator. More... | |
| QString | getSimulatorDetails () const |
| Simulator details as set from the running simulator. More... | |
| void | setDefaultModel (const CAircraftModel &defaultModel) |
| Default model. More... | |
| void | clearDefaultModel () |
| Clear default model. More... | |
| void | clearElevations () |
| Clear elevations. | |
| void | clearCGs () |
| Clear CGs. More... | |
| void | clearSimulationEnvironmentData () |
| Clear data. More... | |
| int | cleanUpElevations (const geo::ICoordinateGeodetic &referenceCoordinate, int maxNumber=-1) |
| Only keep closest ones. More... | |
| bool | rememberGroundElevation (const aviation::CCallsign &requestedForCallsign, bool likelyOnGroundElevation, const geo::ICoordinateGeodetic &elevationCoordinate, const physical_quantities::CLength &epsilon=geo::CElevationPlane::singlePointRadius()) |
| Remember a given elevation. More... | |
| bool | rememberGroundElevation (const aviation::CCallsign &requestedForCallsign, bool likelyOnGroundElevation, const geo::CElevationPlane &elevationPlane) |
| Remember a given elevation. More... | |
| bool | insertCG (const physical_quantities::CLength &cg, const aviation::CCallsign &cs) |
| Insert or replace a CG. More... | |
| bool | insertCG (const physical_quantities::CLength &cg, const QString &modelString, const aviation::CCallsign &cs) |
| Insert or replace a CG. More... | |
| bool | insertCGOverridden (const physical_quantities::CLength &cg, const aviation::CCallsign &cs) |
| Insert or replace a CG. More... | |
| bool | insertCGOverridden (const physical_quantities::CLength &cg, const aviation::CCallsignSet &callsigns) |
| Insert or replace an overridden CG. More... | |
| bool | insertCGForModelString (const physical_quantities::CLength &cg, const QString &modelString) |
| Insert or replace a CG. More... | |
| bool | insertCGForModelStringOverridden (const physical_quantities::CLength &cg, const QString &modelString) |
| Insert or replace a CG (overridden mode) More... | |
| aviation::CLengthPerCallsign | clearCGOverrides () |
| Clear all overridden values. More... | |
| int | removeSimulatorCG (const aviation::CCallsign &cs) |
| Remove a CG for a given callsign. More... | |
| void | removePendingElevationRequest (const aviation::CCallsign &cs) |
| Remove pending timestamp. More... | |
| bool | isCgProviderEnabled () const |
| Provider enabled. More... | |
| bool | isElevationProviderEnabled () const |
| Provider enabled. More... | |
| void | setCgProviderEnabled (bool enabled) |
| Provider enabled. More... | |
| void | setElevationProviderEnabled (bool enabled) |
| Provider enabled. More... | |
| void | setSimulationProviderEnabled (bool elvEnabled, bool cgEnabled) |
| Provider enabled. More... | |
Protected Member Functions inherited from swift::misc::IProvider | |
| IProvider () | |
| Constructor. | |
Static Protected Member Functions | |
| static physical_quantities::CLength | minRange (const physical_quantities::CLength &range) |
| Min.range considered as single point. | |
Direct in memory access to elevation data.
Definition at line 27 of file simulationenvironmentprovider.h.
| CElevationPlane swift::misc::simulation::ISimulationEnvironmentProvider::averageElevationOfOnGroundAircraft | ( | const aviation::CAircraftSituation & | reference, |
| const physical_quantities::CLength & | range, | ||
| int | minValues, | ||
| int | sufficientValues | ||
| ) | const |
Average elevation of "on ground" cached values.
Definition at line 287 of file simulationenvironmentprovider.cpp.
| bool swift::misc::simulation::ISimulationEnvironmentProvider::cleanElevationValues | ( | const aviation::CAircraftSituation & | reference, |
| const physical_quantities::CLength & | keptRange, | ||
| bool | forced = false |
||
| ) |
Remove cached elevations outside range, "forced" cleans always, otherwise only if max.values are reached.
Definition at line 576 of file simulationenvironmentprovider.cpp.
|
protected |
Only keep closest ones.
Definition at line 311 of file simulationenvironmentprovider.cpp.
|
protected |
Clear all overridden values.
Definition at line 234 of file simulationenvironmentprovider.cpp.
|
protected |
Clear CGs.
Definition at line 729 of file simulationenvironmentprovider.cpp.
|
protected |
Clear default model.
Definition at line 712 of file simulationenvironmentprovider.cpp.
|
protected |
Clear data.
Definition at line 737 of file simulationenvironmentprovider.cpp.
| CElevationPlane swift::misc::simulation::ISimulationEnvironmentProvider::findClosestElevationWithinRange | ( | const geo::ICoordinateGeodetic & | reference, |
| const physical_quantities::CLength & | range | ||
| ) | const |
Find closest elevation (or return NULL)
Definition at line 329 of file simulationenvironmentprovider.cpp.
| CElevationPlane swift::misc::simulation::ISimulationEnvironmentProvider::findClosestElevationWithinRangeOrRequest | ( | const geo::ICoordinateGeodetic & | reference, |
| const physical_quantities::CLength & | range, | ||
| const aviation::CCallsign & | callsign | ||
| ) |
Find closest elevation or request elevation.
Definition at line 358 of file simulationenvironmentprovider.cpp.
| CCoordinateGeodeticList swift::misc::simulation::ISimulationEnvironmentProvider::getAllElevationCoordinates | ( | ) | const |
All remembered coordinates.
Definition at line 273 of file simulationenvironmentprovider.cpp.
|
protected |
All remembered coordiantes plus max.remembered ground situations.
Definition at line 302 of file simulationenvironmentprovider.cpp.
| CAircraftModel swift::misc::simulation::ISimulationEnvironmentProvider::getDefaultModel | ( | ) | const |
Default model.
Definition at line 448 of file simulationenvironmentprovider.cpp.
| CCoordinateGeodeticList swift::misc::simulation::ISimulationEnvironmentProvider::getElevationCoordinatesOnGround | ( | ) | const |
All remembered coordinates.
Definition at line 281 of file simulationenvironmentprovider.cpp.
| QPair< qint64, qint64 > swift::misc::simulation::ISimulationEnvironmentProvider::getElevationRequestTimes | ( | ) | const |
The elevation request times.
Definition at line 403 of file simulationenvironmentprovider.cpp.
| QString swift::misc::simulation::ISimulationEnvironmentProvider::getElevationRequestTimesInfo | ( | ) | const |
Elevation request times.
Definition at line 409 of file simulationenvironmentprovider.cpp.
| QPair< int, int > swift::misc::simulation::ISimulationEnvironmentProvider::getElevationsFoundMissed | ( | ) | const |
Elevations found/missed statistics.
Definition at line 379 of file simulationenvironmentprovider.cpp.
| QString swift::misc::simulation::ISimulationEnvironmentProvider::getElevationsFoundMissedInfo | ( | ) | const |
Elevations found/missed statistics info as string.
Definition at line 385 of file simulationenvironmentprovider.cpp.
| int swift::misc::simulation::ISimulationEnvironmentProvider::getMaxElevationsRemembered | ( | ) | const |
Get number of max. number of elevations.
Definition at line 554 of file simulationenvironmentprovider.cpp.
| CLength swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorCG | ( | const aviation::CCallsign & | callsign | ) | const |
Get CG per callsign, NULL if not found.
Definition at line 466 of file simulationenvironmentprovider.cpp.
| CLength swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorCGPerModelString | ( | const QString & | modelString | ) | const |
Get CG per model string, NULL if not found.
Definition at line 494 of file simulationenvironmentprovider.cpp.
| CLengthPerCallsign swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorCGsPerCallsign | ( | ) | const |
All CGs per callsign.
Definition at line 454 of file simulationenvironmentprovider.cpp.
| QHash< QString, CLength > swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorCGsPerModelString | ( | ) | const |
All CGs per modelstring.
Definition at line 460 of file simulationenvironmentprovider.cpp.
|
protected |
Simulator details as set from the running simulator.
Definition at line 700 of file simulationenvironmentprovider.cpp.
| CSimulatorInfo swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorInfo | ( | ) | const |
Get the represented simulator.
Definition at line 425 of file simulationenvironmentprovider.cpp.
|
protected |
Simulator name as set from the running simulator.
Definition at line 688 of file simulationenvironmentprovider.cpp.
| QString swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorNameAndVersion | ( | ) | const |
Version and simulator details info.
Definition at line 430 of file simulationenvironmentprovider.cpp.
| CLength swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorOrDbCG | ( | const aviation::CCallsign & | callsign, |
| const physical_quantities::CLength & | dbCG | ||
| ) | const |
Get CG per callsign, NULL if not found.
Definition at line 476 of file simulationenvironmentprovider.cpp.
| CLength swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorOrDbCGPerModelString | ( | const QString & | modelString, |
| const physical_quantities::CLength & | dbCG | ||
| ) | const |
Get CG per model string, NULL if not found.
Definition at line 505 of file simulationenvironmentprovider.cpp.
| CSimulatorPluginInfo swift::misc::simulation::ISimulationEnvironmentProvider::getSimulatorPluginInfo | ( | ) | const |
Get the represented plugin.
Definition at line 419 of file simulationenvironmentprovider.cpp.
|
protected |
Simulator version as set from the running simulator.
Definition at line 694 of file simulationenvironmentprovider.cpp.
| bool swift::misc::simulation::ISimulationEnvironmentProvider::hasSameSimulatorCG | ( | const physical_quantities::CLength & | cg, |
| const aviation::CCallsign & | callsign | ||
| ) | const |
Has the same CG?
Definition at line 536 of file simulationenvironmentprovider.cpp.
| bool swift::misc::simulation::ISimulationEnvironmentProvider::hasSimulatorCG | ( | const aviation::CCallsign & | callsign | ) | const |
Has a CG?
Definition at line 529 of file simulationenvironmentprovider.cpp.
| CAltitude swift::misc::simulation::ISimulationEnvironmentProvider::highestElevation | ( | ) | const |
Highest elevation.
Definition at line 295 of file simulationenvironmentprovider.cpp.
|
protected |
Insert or replace a CG.
Definition at line 127 of file simulationenvironmentprovider.cpp.
|
protected |
Insert or replace a CG.
Definition at line 140 of file simulationenvironmentprovider.cpp.
|
protected |
Insert or replace a CG.
Definition at line 205 of file simulationenvironmentprovider.cpp.
|
protected |
Insert or replace a CG (overridden mode)
Definition at line 221 of file simulationenvironmentprovider.cpp.
|
protected |
Insert or replace a CG.
Definition at line 175 of file simulationenvironmentprovider.cpp.
|
protected |
Insert or replace an overridden CG.
Definition at line 191 of file simulationenvironmentprovider.cpp.
|
protected |
Provider enabled.
Definition at line 633 of file simulationenvironmentprovider.cpp.
|
protected |
Provider enabled.
Definition at line 639 of file simulationenvironmentprovider.cpp.
| CLength swift::misc::simulation::ISimulationEnvironmentProvider::overriddenCGorDefault | ( | const physical_quantities::CLength & | defaultCG, |
| const QString & | modelString | ||
| ) | const |
Return the overridden CG value or the given default CG value.
Definition at line 242 of file simulationenvironmentprovider.cpp.
|
protected |
Remember a given elevation.
Definition at line 114 of file simulationenvironmentprovider.cpp.
|
protected |
Remember a given elevation.
Definition at line 22 of file simulationenvironmentprovider.cpp.
| int swift::misc::simulation::ISimulationEnvironmentProvider::removeElevationValues | ( | const aviation::CAircraftSituation & | reference, |
| const physical_quantities::CLength & | removeRange | ||
| ) |
Remove cached elevations inside range,.
Definition at line 568 of file simulationenvironmentprovider.cpp.
|
protected |
Remove pending timestamp.
Definition at line 261 of file simulationenvironmentprovider.cpp.
|
protected |
Remove a CG for a given callsign.
Definition at line 252 of file simulationenvironmentprovider.cpp.
|
pure virtual |
Request elevation, there is no guarantee the requested elevation will be available in the provider.
Implemented in swift::simplugin::xplane::CSimulatorXPlane, swift::simplugin::flightgear::CSimulatorFlightgear, swift::simplugin::emulated::CSimulatorEmulated, swift::core::ISimulator, and swift::simplugin::fsxcommon::CSimulatorFsxCommon.
| bool swift::misc::simulation::ISimulationEnvironmentProvider::requestElevationBySituation | ( | const swift::misc::aviation::CAircraftSituation & | situation | ) |
Request elevation, there is no guarantee the requested elevation will be available in the provider.
Definition at line 373 of file simulationenvironmentprovider.cpp.
| void swift::misc::simulation::ISimulationEnvironmentProvider::resetSimulationEnvironmentStatistics | ( | ) |
Reset statistics.
Definition at line 560 of file simulationenvironmentprovider.cpp.
|
protected |
Provider enabled.
Definition at line 645 of file simulationenvironmentprovider.cpp.
|
protected |
Default model.
Definition at line 706 of file simulationenvironmentprovider.cpp.
|
protected |
Provider enabled.
Definition at line 651 of file simulationenvironmentprovider.cpp.
| int swift::misc::simulation::ISimulationEnvironmentProvider::setMaxElevationsRemembered | ( | int | max | ) |
Set number of elevations kept.
Definition at line 547 of file simulationenvironmentprovider.cpp.
|
protected |
New plugin info and default model.
Definition at line 671 of file simulationenvironmentprovider.cpp.
|
protected |
New plugin info and default model.
Definition at line 663 of file simulationenvironmentprovider.cpp.
|
protected |
Provider enabled.
Definition at line 657 of file simulationenvironmentprovider.cpp.
|
protected |
Set version and simulator details from running simulator.
Definition at line 679 of file simulationenvironmentprovider.cpp.