Ref T275, defined the pairs we are using

This commit is contained in:
Klaus Basan
2018-06-17 00:26:49 +02:00
parent 971359743e
commit 5a22b79299
5 changed files with 102 additions and 30 deletions

View File

@@ -88,6 +88,18 @@ namespace BlackMisc
return !m_guessedSceneryDeviation.isNull();
}
bool CAircraftSituationChange::hasElevationDevWithinAllowedRange() const
{
if (m_elvStdDev.isNull()) { return false; }
return m_elvStdDev < allowedAltitudeDeviation();
}
bool CAircraftSituationChange::hasAltitudeDevWithinAllowedRange() const
{
if (m_altStdDev.isNull()) { return false; }
return m_altStdDev < allowedAltitudeDeviation();
}
QString CAircraftSituationChange::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);
@@ -270,6 +282,12 @@ namespace BlackMisc
return noInfo;
}
const CLength &CAircraftSituationChange::allowedAltitudeDeviation()
{
static const CLength allowedStdDev(3, CLengthUnit::ft());
return allowedStdDev;
}
void CAircraftSituationChange::setSceneryDeviation(const CLength &deviation, const CLength &cg, CAircraftSituationChange::GuessedSceneryDeviation hint)
{
m_guessedSceneryDeviation = deviation;