Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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,

Posted

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

Posted

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,

Posted

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é

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.