mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Ref T773, allow to update CG per model string
* needed if CG is overridden by "dot command" * update all existing aircraft (in range) if changing CG per modelstring * made "overriddenCGorDefault" public so it can be checked if overridden * use overridden value in CContextSimulator::xCtxAddedRemoteAircraftReadyForModelMatching * allow to clear overridden values
This commit is contained in:
committed by
Mat Sutcliffe
parent
93652ccd43
commit
2999aebf37
@@ -98,6 +98,14 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
CAircraftModel getDefaultModel() const;
|
||||
|
||||
//! All CGs per callsign
|
||||
//! \threadsafe
|
||||
Aviation::CLengthPerCallsign getSimulatorCGsPerCallsign() const;
|
||||
|
||||
//! All CGs per modelstring
|
||||
//! \threadsafe
|
||||
QHash<QString, PhysicalQuantities::CLength> getSimulatorCGsPerModelString() const;
|
||||
|
||||
//! Get CG per callsign, NULL if not found
|
||||
//! \threadsafe
|
||||
PhysicalQuantities::CLength getSimulatorCG(const Aviation::CCallsign &callsign) const;
|
||||
@@ -114,6 +122,10 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
PhysicalQuantities::CLength getSimulatorOrDbCGPerModelString(const QString &modelString, const PhysicalQuantities::CLength &dbCG) const;
|
||||
|
||||
//! Return the overridden CG value or the given default CG value
|
||||
//! \threadsafe
|
||||
PhysicalQuantities::CLength overriddenCGorDefault(const PhysicalQuantities::CLength &defaultCG, const QString &modelString) const;
|
||||
|
||||
//! Has a CG?
|
||||
//! \threadsafe
|
||||
bool hasSimulatorCG(const Aviation::CCallsign &callsign) const;
|
||||
@@ -228,6 +240,16 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
bool insertCG(const PhysicalQuantities::CLength &cg, const QString &modelString, const Aviation::CCallsign &cs);
|
||||
|
||||
//! Insert or replace a CG
|
||||
//! \remark passing a NULL value will remove the CG
|
||||
//! \threadsafe
|
||||
bool insertCGOverridden(const PhysicalQuantities::CLength &cg, const Aviation::CCallsign &cs);
|
||||
|
||||
//! Insert or replace an overridden CG
|
||||
//! \remark passing a NULL value will remove the CG
|
||||
//! \threadsafe
|
||||
bool insertCGOverridden(const PhysicalQuantities::CLength &cg, const Aviation::CCallsignSet &callsigns);
|
||||
|
||||
//! Insert or replace a CG
|
||||
//! \remark passing a NULL value will remove the CG
|
||||
//! \threadsafe
|
||||
@@ -238,11 +260,11 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
bool insertCGForModelStringOverridden(const PhysicalQuantities::CLength &cg, const QString &modelString);
|
||||
|
||||
//! Return the overridden CG value or the given default CG value
|
||||
//! Clear all overridden values
|
||||
//! \threadsafe
|
||||
PhysicalQuantities::CLength overriddenCGorDefault(const PhysicalQuantities::CLength &cg, const QString &modelString) const;
|
||||
Aviation::CLengthPerCallsign clearCGOverrides();
|
||||
|
||||
//! Remove a CG
|
||||
//! Remove a CG for a given callsign
|
||||
//! \threadsafe
|
||||
int removeSimulatorCG(const Aviation::CCallsign &cs);
|
||||
|
||||
@@ -265,8 +287,9 @@ namespace BlackMisc
|
||||
|
||||
Aviation::CTimestampPerCallsign m_pendingElevationRequests; //!< pending elevation requests for aircraft callsign
|
||||
Aviation::CLengthPerCallsign m_cgsPerCallsign; //!< CGs per callsign
|
||||
Aviation::CLengthPerCallsign m_cgsPerCallsignOverridden; //!< CGs per callsign overridden (manually forced)
|
||||
QHash<QString, PhysicalQuantities::CLength> m_cgsPerModel; //!< CGs per model string
|
||||
QHash<QString, PhysicalQuantities::CLength> m_cgsPerModelOverridden; //!< CGs per model string manually forced
|
||||
QHash<QString, PhysicalQuantities::CLength> m_cgsPerModelOverridden; //!< CGs per model string (manually forced)
|
||||
qint64 m_statsMaxElevRequestTimeMs = -1;
|
||||
qint64 m_statsCurrentElevRequestTimeMs = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user