Now that I sort of understand the Weather API calls, I wanted to get back to the new Facility List API calls, that arrived with the SP1A update to the SimConnect API.
So, what I did was add yet another Sub-Menu to my test-bed program, which was started when we were talking about the Weather API.
The program is an updated version of the previous one and is located in the same place at:
http://www.innergears.com/InnerGears.zip
The new Sub-Menu is called 'Get Facilities', and it opens a window which contains four buttons.
If you click Airports, then I display the returned Facility List of Airports. I also added a curve-of-the-earth (not a straight-line or a point-to-point!) distance call to the dialog, and I then return the distance from my present aircraft position to all of the returned airports. This should be fairly accurate.
What I was hoping is that this might be a great way to determine where in the world I am at the moment.
And, it returned airports out to about a range of 100 miles.
Now, as I was sitting at my favorite Airport (KIAH), I immediately expected to see KIAH in the list...not so! Hmmm...
In fact, If it doesn't contain the airport I'm nearest to, then is it a complete list of airports in my range bubble at all?!? dunno, don't trust it either.
Ok, so I went a made a second button, called Waypoints which returns a Facility List of Waypoints. I get nothing here at all!!! Maybe it's me, but I doubt it.
Ok, so then I added a third button called NDBs which returns the Facility List of NDBs out to about 200-300 miles.
What I did then was move my aircraft over to Jolly-Old England to EGLL. Everything looks good.
Then, I moved my aircraft back to KIAH and saw that the NDB Structure returned was not updated to KIAH. The data remained EGLL. Not so good...
Ok, then I made the fourth and final button called VOR and it returns the Facility List of VORs out to up to 500 miles, I've noticed.
And, it seems to work ok, although after the Airport button, I don't trust it to be a complete list.
Anyway, the program is uploaded to my server for anyone wanting to take a look and see if they get similar results, and if I did something wrong, maybe what that might be?
Also, I read somewhere, that someone was able to modify the range of detection to further than the default, and I'd be interested to know how they accomplished that.
One more thing. There is a cryptic sentence in the documentation that says:
"Given that the list of returned facilities could be large, it may be split across several packets, and each packet must be interpreted separately by the client."
Any ideas on how someone would do this? Config File issue?
Maybe thats why my Airport List isn't complete? dunno...yet
FlapsOut