Ref T259, Ref T243 improved utility function to store elevations in multiple providers

This commit is contained in:
Klaus Basan
2018-03-23 02:26:29 +01:00
parent 1203c58a23
commit 4248c1b689
4 changed files with 13 additions and 10 deletions

View File

@@ -78,6 +78,13 @@ namespace BlackCore
ISimulator::registerHelp();
}
void ISimulator::rememberElevationAndCG(const CCallsign &callsign, const Geo::CElevationPlane &elevation, const CLength &cg)
{
if (callsign.isEmpty()) { return; }
if (!elevation.isNull()) { this->rememberGroundElevation(elevation); }
if (!cg.isNull() && !this->hasSameCG(cg, callsign)) { this->insertCG(cg, callsign); }
}
void ISimulator::emitSimulatorCombinedStatus(SimulatorStatus oldStatus)
{
const SimulatorStatus newStatus = this->getSimulatorStatus();

View File

@@ -258,6 +258,9 @@ namespace BlackCore
//! Remove all remote aircraft
virtual int physicallyRemoveAllRemoteAircraft() = 0;
//! Set elevation and CG in the providers
void rememberElevationAndCG(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Geo::CElevationPlane &elevation, const BlackMisc::PhysicalQuantities::CLength &cg);
//! 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;