mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Style and comments
This commit is contained in:
@@ -70,6 +70,7 @@ namespace BlackMisc
|
||||
CAircraftSituationChange();
|
||||
|
||||
//! Ctor with n situations
|
||||
//! \remark the timestamps of the latest situation will be used
|
||||
CAircraftSituationChange(const CAircraftSituationList &situations, const PhysicalQuantities::CLength &cg, bool isVtol, bool alreadySortedLatestFirst = false, bool calcStdDeviations = false);
|
||||
|
||||
//! Get callsign
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace BlackMisc
|
||||
if (elevationPlane.isNull()) { return 0; }
|
||||
if (this->isEmpty()) { return 0; }
|
||||
|
||||
// the change has the timestamps of the latest situation
|
||||
Q_ASSERT_X(m_tsAdjustedSortHint == CAircraftSituationList::AdjustedTimestampLatestFirst || this->isSortedAdjustedLatestFirstWithoutNullPositions(), Q_FUNC_INFO, "Need sorted situations without NULL positions");
|
||||
const CAircraftSituationChange simpleChange(*this, model.getCG(), model.isVtol(), true, false);
|
||||
int c = 0; // changed elevations
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace BlackMisc
|
||||
const CAircraftSituationChangeList changes = this->remoteAircraftSituationChanges(m_callsign);
|
||||
m_pastSituationsChange = (changes.size() > 1) ? changes[1] : CAircraftSituationChange::null();
|
||||
|
||||
// fixing offset
|
||||
if (setup.isFixingSceneryOffset() && m_pastSituationsChange.hasSceneryDeviation() && m_model.hasCG())
|
||||
{
|
||||
const CLength os = m_pastSituationsChange.getGuessedSceneryDeviationCG();
|
||||
|
||||
@@ -416,8 +416,9 @@ namespace BlackMisc
|
||||
|
||||
void CRemoteAircraftProvider::storeChange(const CAircraftSituationChange &change)
|
||||
{
|
||||
QWriteLocker lock(&m_lockChanges);
|
||||
// a change with the same timestamp will be replaced
|
||||
const CCallsign cs(change.getCallsign());
|
||||
QWriteLocker lock(&m_lockChanges);
|
||||
CAircraftSituationChangeList &changeList = m_changesByCallsign[cs];
|
||||
changeList.push_frontKeepLatestAdjustedFirst(change, true, IRemoteAircraftProvider::MaxSituationsPerCallsign);
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ namespace BlackMisc
|
||||
Aviation::CAircraftSituationPerCallsign m_latestSituationByCallsign; //!< latest situations, for performance reasons per callsign, thread safe access required
|
||||
Aviation::CAircraftSituationPerCallsign m_latestOnGroundProviderElevation; //!< situation on ground with elevation from provider
|
||||
Aviation::CAircraftPartsListPerCallsign m_partsByCallsign; //!< parts, for performance reasons per callsign, thread safe access required
|
||||
Aviation::CAircraftSituationChangeListPerCallsign m_changesByCallsign; //!< changes, for performance reasons per callsign, thread safe access required
|
||||
Aviation::CAircraftSituationChangeListPerCallsign m_changesByCallsign; //!< changes, for performance reasons per callsign, thread safe access required (same timestamps as corresponding situations)
|
||||
Aviation::CCallsignSet m_aircraftWithParts; //!< aircraft supporting parts, thread safe access required
|
||||
int m_situationsAdded = 0; //!< total number of situations added, thread safe access required
|
||||
int m_partsAdded = 0; //!< total number of parts added, thread safe access required
|
||||
|
||||
Reference in New Issue
Block a user