Erdemes Posted January 21, 2009 Report Posted January 21, 2009 Hi all, I am writing a Flight Data Recorder for FS9 and I need to know if the user aircraft is in runway or not.I got all the information of runways out of FS with MakeRwys.But I don't know how to use these data.How should I write an equation which could tell me if the aircraft is on runway or not? P.S: I am using VB.NET. Thank You,
Pete Dowson Posted January 21, 2009 Report Posted January 21, 2009 I am writing a Flight Data Recorder for FS9 and I need to know if the user aircraft is in runway or not.I got all the information of runways out of FS with MakeRwys.But I don't know how to use these data.How should I write an equation which could tell me if the aircraft is on runway or not? You need to use the runway centre Lat/Lon, its true heading, and its width and length to compute the Lat/Lon coordinates of the four corners, then see if the aircraft position lies within them. It is mostly simple arithmetic and a little simple trigonometry. Draw yourself a little diagram and you'll see how to work it out. Sorry, I really haven't got time to work it all out for you. If you are really stuck maybe someone will jump it, but otherwise, for general programming questions like this, you might get more detailed answers posting on one of the programming-oriented forums, maybe over at Avsim? Regards Pete
Erdemes Posted January 24, 2009 Author Report Posted January 24, 2009 Thank you Pete for your answer. Is there anyone who can help me to get the correct equation for calculating the four corners of the runway with the data I get from MakeRwys and check if the aircraft is on runway or not? Thanks,
hsors Posted January 25, 2009 Report Posted January 25, 2009 There is some mathematical techniques to determine whether a point is inside a polygon. have a look here http://alienryderflex.com/polygon/ http://local.wasp.uwa.edu.au/~pbourke//nsidepoly/ Alternatively, you can try to use surface type FSUIPC information at offset x31E8. Withe some precautions, it can help determining if the aircraft is on or off the runway. However some third party sceneries may lead to deceptive results. Regards Hervé
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