use the server's IAFs to check if we have a new inbound and over which IAF

This commit is contained in:
Sven Czarnian
2021-12-26 10:43:15 +01:00
parent 0a586f88c3
commit 1873c68ab0
2 changed files with 113 additions and 38 deletions

View File

@@ -47,6 +47,10 @@ namespace aman {
std::vector<std::string> arrivalRunways;
std::list<std::string> inboundUpdates;
};
struct InitialApproachFix {
std::string name;
GeoCoordinate coordinate;
};
enum class TagItemElement {
EstimatedTimeOfArrival = 0,
@@ -56,6 +60,7 @@ namespace aman {
};
void validateBackendData();
void receiveConfiguration(const std::string& airport);
aman::Aircraft* generateAircraftMessage(const EuroScopePlugIn::CRadarTarget& target) const;
void generateAircraftReportMessage(EuroScopePlugIn::CRadarTarget& radarTarget, aman::AircraftReport* report);
void addUpdateQueue(EuroScopePlugIn::CRadarTarget& radarTarget);
@@ -64,18 +69,19 @@ namespace aman {
static void distanceToPredictedIaf(const EuroScopePlugIn::CRadarTarget& radarTarget, const EuroScopePlugIn::CFlightPlan& flightPlan,
const EuroScopePlugIn::CPosition& iafPosition, aman::AircraftReport* report);
Communication m_configuration;
std::shared_ptr<RadarScreen> m_screen;
std::mutex m_updateQueueLock;
std::map<std::string, AirportData> m_updateQueue;
std::mutex m_inboundsQueueLock;
std::map<std::string, Inbound> m_inbounds;
std::map<std::string, std::string> m_selectedRunway;
std::list<std::string> m_forcedToBackendCallsigns;
bool m_compatible;
bool m_connectedToNetwork;
bool m_sweatboxValid;
bool m_playbackValid;
Communication m_configuration;
std::shared_ptr<RadarScreen> m_screen;
std::mutex m_updateQueueLock;
std::map<std::string, AirportData> m_updateQueue;
std::map<std::string, std::vector<InitialApproachFix>> m_initialApproachFixes;
std::mutex m_inboundsQueueLock;
std::map<std::string, Inbound> m_inbounds;
std::map<std::string, std::string> m_selectedRunway;
std::list<std::string> m_forcedToBackendCallsigns;
bool m_compatible;
bool m_connectedToNetwork;
bool m_sweatboxValid;
bool m_playbackValid;
public:
/**