mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 09:45:44 +08:00
refs #865, allow to override in setGroundElevationFromHint
This commit is contained in:
committed by
Mathew Sutcliffe
parent
085f25fa86
commit
bc3bd41c97
@@ -321,9 +321,9 @@ namespace BlackMisc
|
|||||||
this->m_interpolationLogs.clear();
|
this->m_interpolationLogs.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IInterpolator::setGroundElevationFromHint(const CInterpolationHints &hints, CAircraftSituation &situation)
|
void IInterpolator::setGroundElevationFromHint(const CInterpolationHints &hints, CAircraftSituation &situation, bool override)
|
||||||
{
|
{
|
||||||
if (situation.hasGroundElevation()) { return; }
|
if (!override && situation.hasGroundElevation()) { return; }
|
||||||
const CAltitude elevation = hints.getGroundElevation(situation);
|
const CAltitude elevation = hints.getGroundElevation(situation);
|
||||||
if (elevation.isNull()) { return; }
|
if (elevation.isNull()) { return; }
|
||||||
situation.setGroundElevation(elevation);
|
situation.setGroundElevation(elevation);
|
||||||
|
|||||||
@@ -193,8 +193,8 @@ namespace BlackMisc
|
|||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
static QString getHtmlPartsLog(const QList<PartsLog> &logs);
|
static QString getHtmlPartsLog(const QList<PartsLog> &logs);
|
||||||
|
|
||||||
//! Set the ground elevation from hints, if possible and not already set
|
//! Set the ground elevation from hints
|
||||||
static void setGroundElevationFromHint(const CInterpolationHints &hints, BlackMisc::Aviation::CAircraftSituation &situation);
|
static void setGroundElevationFromHint(const CInterpolationHints &hints, BlackMisc::Aviation::CAircraftSituation &situation, bool override = true);
|
||||||
|
|
||||||
//! Set on ground flag
|
//! Set on ground flag
|
||||||
static void setGroundFlagFromInterpolator(const CInterpolationHints &hints, double groundFactor, BlackMisc::Aviation::CAircraftSituation &situation);
|
static void setGroundFlagFromInterpolator(const CInterpolationHints &hints, double groundFactor, BlackMisc::Aviation::CAircraftSituation &situation);
|
||||||
|
|||||||
Reference in New Issue
Block a user