Jump to content
The simFlight Network Forums

FsILSInfo


Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.