Ref T261, a global altitude offset can be enabled for testing

This commit is contained in:
Klaus Basan
2018-04-28 19:54:02 +02:00
committed by Roland Winklmeier
parent a2ab62a25a
commit 2d66fd470a
3 changed files with 20 additions and 2 deletions

View File

@@ -480,10 +480,17 @@ namespace BlackMisc
bool CRemoteAircraftProvider::testAddAltitudeOffsetToSituation(CAircraftSituation &situation) const
{
if (!this->hasTestAltitudeOffset(situation.getCallsign())) { return false; }
const CCallsign cs(situation.getCallsign());
// for global offset testing set "true"
constexpr bool globalOffsetTest = false;
const CCallsign cs(situation.getCallsign());
if (!globalOffsetTest && !this->hasTestAltitudeOffset(cs)) { return false; }
CLength os;
if (globalOffsetTest)
{
os = CLength(100, CLengthUnit::ft());
}
else
{
QReadLocker l(&m_lockSituations);
os = m_testOffset.value(cs);