Jump to content
The simFlight Network Forums

Detect plane in runway


Recommended Posts

5 hours ago, vgmarimon said:

Hi all, hi Pete, how is the best way to detect when plane is over a runway? Thx

Are you  programming using the Client DLL for .Net? If not you are certainly in the wrong place!

The only way to detect if you are over a runway is to read a database of runwats and comparing your coordinates!



Link to comment
Share on other sites

The Example project that comes with the DLL has code to check if the player is on 27L at Heathrow.

The DLL includes helper libraries to do all the geometry calculations for this.

You'll need a database of runway locations, headings, widths and lengths etc. You could get this information from one of the many files produced by Pete's MakeRunways program.

There is a class called FSLatLonQuadrateral which has a method to construct a rectangle from the runway information:

FsLatLonQuadrilateral myRunway = FsLatLonQuadrilateral.ForRunway(thresholdCentre, trueHeading, rwyWidth, rwyLength);

You can then check if the player is inside that rectangle with:


Where 'currentPosition' is an instance of FsLatLonPoint set to the current plane coordinates.

For more details about these classes please see the Example Project (C# or VB.NET) and the UserGuide.pdf.



  • Upvote 1
Link to comment
Share on other sites

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.