mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 01:35:45 +08:00
Ref T778, style and comments, debug hints
This commit is contained in:
committed by
Mat Sutcliffe
parent
829777bf3a
commit
46d417c5a2
@@ -1454,10 +1454,10 @@ namespace BlackCore
|
|||||||
// average elevation
|
// average elevation
|
||||||
// 1) from cache
|
// 1) from cache
|
||||||
// 2) from planes on ground not moving
|
// 2) from planes on ground not moving
|
||||||
bool fromNonMoving = false;
|
bool fromNonMoving = false;
|
||||||
bool triedExtrapolation = false;
|
bool triedExtrapolation = false;
|
||||||
bool couldNotExtrapolate = false;
|
bool couldNotExtrapolate = false;
|
||||||
int fromWhere = -1; // debugging
|
int fromWhere = -1; // debugging
|
||||||
|
|
||||||
CElevationPlane averagePlane = this->averageElevationOfOnGroundAircraft(situation, CElevationPlane::minorAirportRadius(), 2, 3);
|
CElevationPlane averagePlane = this->averageElevationOfOnGroundAircraft(situation, CElevationPlane::minorAirportRadius(), 2, 3);
|
||||||
if (averagePlane.isNull())
|
if (averagePlane.isNull())
|
||||||
@@ -1485,6 +1485,7 @@ namespace BlackCore
|
|||||||
fromWhere = 20;
|
fromWhere = 20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Q_UNUSED(fromWhere)
|
||||||
|
|
||||||
// still no elevation
|
// still no elevation
|
||||||
if (!correctedSituation.hasGroundElevation())
|
if (!correctedSituation.hasGroundElevation())
|
||||||
@@ -1668,4 +1669,5 @@ namespace BlackCore
|
|||||||
CAirspaceMonitor::FsInnPacket::FsInnPacket(const QString &aircraftIcaoDesignator, const QString &airlineIcaoDesignator, const QString &combinedCode, const QString &modelString) :
|
CAirspaceMonitor::FsInnPacket::FsInnPacket(const QString &aircraftIcaoDesignator, const QString &airlineIcaoDesignator, const QString &combinedCode, const QString &modelString) :
|
||||||
aircraftIcaoDesignator(aircraftIcaoDesignator.trimmed().toUpper()), airlineIcaoDesignator(airlineIcaoDesignator.trimmed().toUpper()), combinedCode(combinedCode.trimmed().toUpper()), modelString(modelString.trimmed())
|
aircraftIcaoDesignator(aircraftIcaoDesignator.trimmed().toUpper()), airlineIcaoDesignator(airlineIcaoDesignator.trimmed().toUpper()), combinedCode(combinedCode.trimmed().toUpper()), modelString(modelString.trimmed())
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ namespace BlackCore
|
|||||||
if (plane.isNull()) { return; } // this happens if requested for a coordinate where scenery is not available
|
if (plane.isNull()) { return; } // this happens if requested for a coordinate where scenery is not available
|
||||||
|
|
||||||
// Update in remote aircraft for given callsign
|
// Update in remote aircraft for given callsign
|
||||||
|
// this will trigger also a position update, new interpolant etc.
|
||||||
bool updatedForOnGroundPosition = false;
|
bool updatedForOnGroundPosition = false;
|
||||||
const int updated = CRemoteAircraftAware::updateAircraftGroundElevation(callsign, plane, CAircraftSituation::FromProvider, &updatedForOnGroundPosition);
|
const int updated = CRemoteAircraftAware::updateAircraftGroundElevation(callsign, plane, CAircraftSituation::FromProvider, &updatedForOnGroundPosition);
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ namespace BlackMisc
|
|||||||
//! \sa Geo::ICoordinateGeodetic::equalNormalVectorDouble
|
//! \sa Geo::ICoordinateGeodetic::equalNormalVectorDouble
|
||||||
bool equalPbhAndVector(const CAircraftSituation &other) const;
|
bool equalPbhAndVector(const CAircraftSituation &other) const;
|
||||||
|
|
||||||
//! Equal PBH and vector
|
//! Equal PBH and vecto, plus altitude
|
||||||
//! \sa Geo::ICoordinateGeodetic::equalNormalVectorDouble
|
//! \sa Geo::ICoordinateGeodetic::equalNormalVectorDouble
|
||||||
bool equalPbhVectorAltitude(const CAircraftSituation &other) const;
|
bool equalPbhVectorAltitude(const CAircraftSituation &other) const;
|
||||||
|
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
Q_ASSERT_X(!m_callsign.isEmpty(), Q_FUNC_INFO, "Missing callsign");
|
Q_ASSERT_X(!m_callsign.isEmpty(), Q_FUNC_INFO, "Missing callsign");
|
||||||
|
|
||||||
const qint64 lastModifed = this->situationsLastModified(m_callsign);
|
const qint64 lastModifed = this->situationsLastModified(m_callsign);
|
||||||
const bool slowUpdateStep = (((m_interpolatedSituationsCounter + aircraftNumber) % 25) == 0); // flag when parts are updated, which need not to be updated every time
|
const bool slowUpdateStep = (((m_interpolatedSituationsCounter + aircraftNumber) % 25) == 0); // flag when parts are updated, which need not to be updated every time
|
||||||
const bool changedSituations = lastModifed > m_situationsLastModified;
|
const bool changedSituations = lastModifed > m_situationsLastModified;
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ namespace BlackMisc
|
|||||||
CInterpolatorSpline::CInterpolant CInterpolatorSpline::getInterpolant(SituationLog &log)
|
CInterpolatorSpline::CInterpolant CInterpolatorSpline::getInterpolant(SituationLog &log)
|
||||||
{
|
{
|
||||||
// recalculate derivatives only if they changed
|
// recalculate derivatives only if they changed
|
||||||
|
// m_situationsLastModified updated in initIniterpolationStepData
|
||||||
const bool recalculate = (m_currentTimeMsSinceEpoch >= m_nextSampleAdjustedTime) || // new step
|
const bool recalculate = (m_currentTimeMsSinceEpoch >= m_nextSampleAdjustedTime) || // new step
|
||||||
(m_situationsLastModified > m_situationsLastModifiedUsed); // modified
|
(m_situationsLastModified > m_situationsLastModifiedUsed); // modified
|
||||||
|
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ namespace BlackSimPlugin
|
|||||||
void increaseAddingExceptions() { m_addingExceptions++; }
|
void increaseAddingExceptions() { m_addingExceptions++; }
|
||||||
|
|
||||||
//! Decrease adding exception
|
//! Decrease adding exception
|
||||||
void decreaseAddingExceptions() { if (m_addingExceptions > 0) { m_addingExceptions--; } ; }
|
void decreaseAddingExceptions() { if (m_addingExceptions > 0) { m_addingExceptions--; } }
|
||||||
|
|
||||||
//! Adding and directly removed
|
//! Adding and directly removed
|
||||||
int getAddingDirectlyRemoved() const { return m_addingDirectlyRemoved; }
|
int getAddingDirectlyRemoved() const { return m_addingDirectlyRemoved; }
|
||||||
|
|||||||
Reference in New Issue
Block a user