mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T322, in airspace monitor update ATC station distance
This commit is contained in:
committed by
Roland Winklmeier
parent
be6ae734a0
commit
fa3555b792
@@ -185,6 +185,18 @@ namespace BlackCore
|
||||
return CFlightPlanRemarks();
|
||||
}
|
||||
|
||||
CAtcStationList CAirspaceMonitor::getAtcStationsOnlineRecalculated()
|
||||
{
|
||||
m_atcStationsOnline.calculcateAndUpdateRelativeDistanceAndBearing(this->getOwnAircraftSituation());
|
||||
return m_atcStationsOnline;
|
||||
}
|
||||
|
||||
CAtcStationList CAirspaceMonitor::getAtcStationsBookedRecalculated()
|
||||
{
|
||||
m_atcStationsBooked.calculcateAndUpdateRelativeDistanceAndBearing(this->getOwnAircraftSituation());
|
||||
return m_atcStationsBooked;
|
||||
}
|
||||
|
||||
CUserList CAirspaceMonitor::getUsers() const
|
||||
{
|
||||
CUserList users;
|
||||
@@ -439,6 +451,8 @@ namespace BlackCore
|
||||
m_atcStationsBooked = newBookedStations;
|
||||
}
|
||||
m_bookingsRequested = false; // we already emit here
|
||||
m_atcStationsBooked.calculcateAndUpdateRelativeDistanceAndBearing(this->getOwnAircraftSituation());
|
||||
|
||||
emit this->changedAtcStationsBooked(); // all booked stations reloaded
|
||||
}
|
||||
|
||||
@@ -547,6 +561,9 @@ namespace BlackCore
|
||||
// subsequent queries
|
||||
this->sendInitialAtcQueries(callsign);
|
||||
|
||||
// update distances
|
||||
m_atcStationsOnline.calculcateAndUpdateRelativeDistanceAndBearing(this->getOwnAircraftSituation());
|
||||
|
||||
emit this->changedAtcStationsOnline();
|
||||
// Remark: this->changedAtcStationOnlineConnectionStatus
|
||||
// will be sent in psFsdAtisVoiceRoomReceived
|
||||
|
||||
@@ -97,9 +97,15 @@ namespace BlackCore
|
||||
//! Returns the current online ATC stations (consolidated with booked stations)
|
||||
BlackMisc::Aviation::CAtcStationList getAtcStationsOnline() const { return m_atcStationsOnline; }
|
||||
|
||||
//! Recalculate distance to own aircraft
|
||||
BlackMisc::Aviation::CAtcStationList getAtcStationsOnlineRecalculated();
|
||||
|
||||
//! Returns the current booked ATC stations (consolidated with online stations)
|
||||
BlackMisc::Aviation::CAtcStationList getAtcStationsBooked() const { return m_atcStationsBooked; }
|
||||
|
||||
//! Recalculate distance to own aircraft
|
||||
BlackMisc::Aviation::CAtcStationList getAtcStationsBookedRecalculated();
|
||||
|
||||
//! Returns the closest ATC station operating on the given frequency, if any
|
||||
BlackMisc::Aviation::CAtcStation getAtcStationForComUnit(const BlackMisc::Aviation::CComSystem &comSystem) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user