Ref T384, get closest ATC stations online

This commit is contained in:
Klaus Basan
2018-10-04 17:18:08 +02:00
parent 4c159d8293
commit 7300a2af1f
7 changed files with 30 additions and 2 deletions

View File

@@ -618,6 +618,14 @@ namespace BlackCore
return stations;
}
CAtcStationList CContextNetwork::getClosestAtcStationsOnline(int number) const
{
if (!this->getIContextOwnAircraft()) { return CAtcStationList(); }
const CAircraftSituation ownSituation = this->getIContextOwnAircraft()->getOwnAircraftSituation();
const CAtcStationList stations = m_airspace->getAtcStationsOnline().findClosest(number, ownSituation);
return stations;
}
CAtcStationList CContextNetwork::getAtcStationsBooked(bool recalculateDistance) const
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }