mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +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();
|
||||
}
|
||||
|
||||
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);
|
||||
if (elevation.isNull()) { return; }
|
||||
situation.setGroundElevation(elevation);
|
||||
|
||||
@@ -193,8 +193,8 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
static QString getHtmlPartsLog(const QList<PartsLog> &logs);
|
||||
|
||||
//! Set the ground elevation from hints, if possible and not already set
|
||||
static void setGroundElevationFromHint(const CInterpolationHints &hints, BlackMisc::Aviation::CAircraftSituation &situation);
|
||||
//! Set the ground elevation from hints
|
||||
static void setGroundElevationFromHint(const CInterpolationHints &hints, BlackMisc::Aviation::CAircraftSituation &situation, bool override = true);
|
||||
|
||||
//! Set on ground flag
|
||||
static void setGroundFlagFromInterpolator(const CInterpolationHints &hints, double groundFactor, BlackMisc::Aviation::CAircraftSituation &situation);
|
||||
|
||||
Reference in New Issue
Block a user