javiercuellar Posted January 28, 2010 Report Posted January 28, 2010 Hi, Is there a way that the airplane is in a runway? I want to run a process when that condition is true. FsPassangers is able to do it because they launch an audio file, so it should be possible, but how? Thanks Javier
Pete Dowson Posted January 29, 2010 Report Posted January 29, 2010 Is there a way that the airplane is in a runway? I want to run a process when that condition is true.FsPassangers is able to do it because they launch an audio file, so it should be possible, but how? The only way I know is by using a database of runways, like those produced by my freeware "MakeRunways" program, and use the Latitude and Longitude of the aircraft to work it out from the latitudes and longitudes of the runway centres, with their lengths and widths to define the rectangle. Alternatively I suppose it could be done by finding the correct AFD (Airport Facilities Data) BGL at the time, and analysing the runway data in that. But I would have thought that would take too long unless they've found where it might be in FS memory -- the latter would be neat. ;-) If FSPassengers does it without a database or reading the AFD data "on the fly", then the author(s) must have found a different way. If they have I doubt they'd release the information. There are several interesting programs which do clever things like that -- FollowMe, for instance, is able to get the taxi routing which FSX ATC would direct traffic along and use it to route the FollowMe car. Regards Pete
javiercuellar Posted January 29, 2010 Author Report Posted January 29, 2010 Ok, I understand it. What do you think about this. Searching that big db too frequently will bring a performance issue :?: , so maybe an approach will be, knowing the Icao of your current position. With this, the search in the DB will be very fast. Now, how to get the icao? :? mmmm. Lets think about a default cessna 172. It has a GPS, and there is an option "Nearest" that gives the nearest airports, ndb, dme, etc. Looking at nearest airport, the one with 0nm will be the one I'm in (it is true if I'm in ground an obviously in an airport). With that icao, look for the Latitude and Longitude of Rwys and calculate if the plane is in rwy. The question is: where is that "nearest" information? :?
Pete Dowson Posted January 29, 2010 Report Posted January 29, 2010 Searching that big db too frequently will bring a performance issue :?: , so maybe an approach will be, knowing the Icao of your current position. With this, the search in the DB will be very fast. Now, how to get the icao?The question is: where is that "nearest" information? Yes, and it is a good question. If you find the answer please do let me know and I'll add it as an FSUIPC offset. The only way I know at present is to use the latitude and longitude and a database, again. If you do have to resort to a database, it would be best to do a little pre-processing when your program starts. Read in the list of runways and create your internal index of rectangles (i.e. compute the four corners) sort the rectangles into Latitude and Longitude order using, say, the most south (first criteria) and westward (second criteria) corner as the index. Then your search can be made quite efficient. Regards Pete
javiercuellar Posted January 29, 2010 Author Report Posted January 29, 2010 Yes, and it is a good question. If you find the answer please do let me know and I'll add it as an FSUIPC offset. I found this http://www.fsdeveloper.com/wiki/index.php?title=GPS_Variables:_How_to_Access&diff=5800&oldid=5799 There is a section Nearest Airport Data that shows NearestAirportCurrentLatitude NearestAirportCurrentLongitude maybe that shows something interesting. Write now I'm not able to "look" at those variables because don't know nothing about simconnect. I will investigate what that page is talking about and let you know if find interesting. Regards Javier
javiercuellar Posted January 29, 2010 Author Report Posted January 29, 2010 ok, I know where that information comes from: the gps gauge, so, probable it is not useful.
Pete Dowson Posted January 29, 2010 Report Posted January 29, 2010 ok, I know where that information comes from: the gps gauge, so, probable it is not useful. If it holds it in an "L:variable" you can access those through FSUIPC. But it seems doubtful. Regards Pete
Pete Dowson Posted February 2, 2010 Report Posted February 2, 2010 Searching that big db too frequently will bring a performance issue :?: , so maybe an approach will be, knowing the Icao of your current position. With this, the search in the DB will be very fast. Now, how to get the icao?The question is: where is that "nearest" information? Yes, and it is a good question. If you find the answer please do let me know and I'll add it as an FSUIPC offset. I've found a way to do it through SimConnect for FSX and ESP. I can't do it for FS9 or before, but if you are using FSX, let me know. I plan on adding offsets giving ICAO, Latitude, Longitude and Altitude for the 6 airports nearest the user aircraft, in order 1st to 6th. Probably in an update tomorrow (Tuesday). Regards Pete
javiercuellar Posted February 2, 2010 Author Report Posted February 2, 2010 :D that is a wonderful notice!!!!. Yes I'm using FSX. Thanks a lot. Regards Javier
cjellwood Posted February 6, 2010 Report Posted February 6, 2010 Hi. I may be missing the point here so apologies if this is not helpfull. Offset 0366 lets you know if the plane is on the ground or not. Maybe no good for runway landing confirmation but can be used in conjunction with this airport/runway xml file. It gives you airport co-ords, runway co-ords plus other usefull data such as helipad, parking spot co-ords that could make more usefull features in your application. http://www.leons-world.com/files/AirportData.zip Credit to James Kier for helping me create that xml file. Another file is available that provides VOR, NDB and ILS data available on request. Chris
javiercuellar Posted February 7, 2010 Author Report Posted February 7, 2010 Hi Chris. Yes, that is the idea. I created a similar file with Pete's software "MakeRunways". Now that I'm able to know where my plane is, I can know if it is on the runway.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now