kingm56 Posted April 18, 2021 Report Posted April 18, 2021 Good evening, Mr. Henty! When convenient, would you mind providing a quick demonstration on how to use FsILSInfo class via managed code (c#). Again, thank you for EVERYTHING you do!
Paul Henty Posted April 18, 2021 Report Posted April 18, 2021 Hi, The basic use of the airports database is covered in the example code application. The examples below for the ILS info assume you already have an FsAirport object. I've used EGLL: // Get airport info for EGLL FsAirport egll = db.Airports["EGLL"]; Example 1: Getting all runways at the airport with ILS info and displaying the ILS details in a listbox: // Clear any ILS info in the listbox this.lstILS.Items.Clear(); // Go through each runway and find those with ILS info foreach (FsRunway rw in egll.Runways) { if (rw.ILSInfo != null) { // This runway has ILS Data - Show it in the list box string ilsInfo = "Runway " + rw.ID + " | Freq: " + rw.ILSInfo.Frequency + " | Hdg: " + rw.ILSInfo.Heading.ToString("F0"); this.lstILS.Items.Add(ilsInfo); } } Example 2: Getting ILS info for a specific runway at the airport: string runwayID = "27L"; FsRunway rw = egll.Runways[runwayID]; if (rw != null) { if (rw.ILSInfo != null) { string ilsInfo = "Runway " + runwayID + " | Freq: " + rw.ILSInfo.Frequency + " | Hdg: " + rw.ILSInfo.Heading.ToString("F0"); MessageBox.Show(ilsInfo); } else { MessageBox.Show("Runway " + runwayID + " has no ILS"); } } The FsILSInfo class has a few other properties: http://fsuipc.paulhenty.com/Reference/html/classFSUIPC_1_1FsILSInfo.html Paul
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