So, I am trying to get a list of airports near me via simconnect. I know I’ll have to filter with my lat/lon after I get them, but thats TBD at this point.
I can either subscribe or hit the simconnect api repeatedly with RequestFacilitiesList.
Either way I go, I get the same 1243 airports in the each “entry set”. I get 30 pages of results, but they are all the same.
Has anyone else seen this?
Github to reproduce the issue, just clone it down f5 and hit connect, it will show you all the data in the little error box. I have no KCWA, KHYI, but 30 KLAXs… because it is in the results that come back for each 30 pages
from airport a
where a.name like '%Same%'
3794 1 HTSE Same AFR HT [...] 37.7000007629395 -4.08333349227905
Ah! Even the Same Airstrip is available - the same Same Airstrip that we initially get 30 times with the SubscribeToFacilities results (and the only 30 results that we get with RequestFacilitiesList), with the same lat / lon coordinates.
I will probably go for a “mixture” like:
If Little Navmap DB is installed: use it (skip the following points)
SubscribeToFacilities, store the received airports in an unsorted hashmap (key: ICAO, value: airport data) and at the end of the flight see whether we get some meaningful results out of this (that is, iterate over the hashmap and compare the start / end coordinate of the flight with the coordinates of the airports: if within a given threshold distance → that’s the airport we flew from/to)
Try again with GPS WP NEXT ID and GPS WP PREV ID and see whether we get values here (last time I tried with SimvarWatcher to get those as “string variables” I received empty values, even though I had setup a simple FROM / TO flight plan on the FS 2020 world map - maybe the aircraft needs to have a “GPS navigation device” built in in order to get actual values here? Or “GPS / NAV / autopilot” needs to be engaged?)
But jeez! All this in order to get two simple ICAO code values, of the start and end airports (if started / landed) of the flight…
That sounds cool. I am developing a flight replay application and am currently looking into adding additional information to the saved flights, in this context here the ICAO codes of the start and destination.
Just out of curiosity: are the radio / communication streams freely available, as some MP3 (or other compressed audio format) stream? Much like radio stations?
Ah, I understand: a web service “for friends and families” then That’s what I thought (streaming all the radio communications for free would cost quite some bandwidth, I guess). Unless such a service is paid I guess the bandwith requirements would exceed a “private developer’s budget”.