mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
Ref T773, improved info texts and statistics values
This commit is contained in:
committed by
Mat Sutcliffe
parent
f2096bd826
commit
181c2b8061
@@ -443,6 +443,9 @@ namespace BlackCore
|
||||
this->removeAllOnlineAtcStations();
|
||||
this->removeAllAircraft();
|
||||
this->clearClients();
|
||||
|
||||
m_foundInNonMovingAircraft = 0;
|
||||
m_foundInElevationsOnGnd = 0;
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::gracefulShutdown()
|
||||
@@ -470,10 +473,10 @@ namespace BlackCore
|
||||
return;
|
||||
}
|
||||
|
||||
const int rInt = range.valueInteger(CLengthUnit::NM());
|
||||
CLogMessage(this).info(u"Set airspace max. range to %1NM") << rInt;
|
||||
m_maxDistanceNM = rInt;
|
||||
m_maxDistanceNMHysteresis = qRound(rInt * 1.1);
|
||||
const int rIntNM = range.valueInteger(CLengthUnit::NM());
|
||||
CLogMessage(this).info(u"Set airspace max. range to %1NM") << rIntNM;
|
||||
m_maxDistanceNM = rIntNM;
|
||||
m_maxDistanceNMHysteresis = qRound(rIntNM * 1.1);
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::onRealNameReplyReceived(const CCallsign &callsign, const QString &realname)
|
||||
@@ -1419,17 +1422,18 @@ namespace BlackCore
|
||||
bool fromNonMoving = false;
|
||||
bool triedExtrapolation = false;
|
||||
bool couldNotExtrapolate = false;
|
||||
|
||||
CElevationPlane averagePlane = this->averageElevationOfOnGroundAircraft(situation, CElevationPlane::majorAirportRadius(), 2, 3);
|
||||
if (averagePlane.isNull())
|
||||
{
|
||||
averagePlane = this->averageElevationOfNonMovingAircraft(situation, CElevationPlane::majorAirportRadius(), 2);
|
||||
fromNonMoving = true;
|
||||
}
|
||||
|
||||
// do we have a elevation yet?
|
||||
if (!averagePlane.isNull())
|
||||
{
|
||||
correctedSituation.setGroundElevation(averagePlane, CAircraftSituation::Average);
|
||||
if (fromNonMoving) { m_foundInNonMovingAircraft++; } else { m_foundInElevationsOnGnd++; }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -293,6 +293,8 @@ namespace BlackCore
|
||||
bool m_bookingsRequested = false; //!< bookings have been requested, it can happen we receive an BlackCore::Vatsim::CVatsimBookingReader::atcBookingsReadUnchanged signal
|
||||
int m_maxDistanceNM = 125; //!< position range / FSD range
|
||||
int m_maxDistanceNMHysteresis = qRound(1.1 * m_maxDistanceNM);
|
||||
int m_foundInNonMovingAircraft = 0;
|
||||
int m_foundInElevationsOnGnd = 0;
|
||||
|
||||
// Processing for queries etc. (fast)
|
||||
static constexpr int FastProcessIntervalMs = 50; //!< interval in ms
|
||||
|
||||
Reference in New Issue
Block a user