Hi,
In an C++ app I am developing, I need to find the airport ICAO of the airport I have my airplane on. The airplane can be placed anywhere withing the airport area. I am using SIMCONNECT_RECV_FACILITIES_LIST to get a list all airports in the area. But, how can I make sure that the correct airport can be identified from this list. It must be 100% correct.
How to find the airports ICAO
Re: How to find the airports ICAO
Can you not use:
SimConnect_RequestFacilitiesList to get a list of SIMCONNECT_RECV_AIRPORT_LIST, which will contain a list of SIMCONNECT_DATA_FACILITY_AIRPORT structures.
Then compare your aircraft lat/lon with the ICAO lat/lon. Pick the one with the smallest difference between the co-ords.
SimConnect_RequestFacilitiesList to get a list of SIMCONNECT_RECV_AIRPORT_LIST, which will contain a list of SIMCONNECT_DATA_FACILITY_AIRPORT structures.
Then compare your aircraft lat/lon with the ICAO lat/lon. Pick the one with the smallest difference between the co-ords.
Ron