vgmarimon Posted August 26, 2016 Report Posted August 26, 2016 Hi all, hi Pete, how is the best way to detect when plane is over a runway? Thx
Pete Dowson Posted August 26, 2016 Report Posted August 26, 2016 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! Pete
Paul Henty Posted August 26, 2016 Report Posted August 26, 2016 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: myRunway.ContainsPoint(currentPosition) 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. Paul 1
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