Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Building a custom airport with an ILS runway

Featured Replies

I have been struggling for two weeks to build a custom airport with an ILS for MSFS2020. I used to know how do this in Scruffy Duck's ADE for FXS, 20 years ago, but apparently Asobo has changed things. After several days of frustration, and untold hours spent experimenting with Heading and Magvar settings in the XML file, and researching potential solutions on-line, I have finally figured how to construct this data in the XML file so that the ILS localizer lines up with the runway, and the cockpit instruments (VOR or PFD) work the way they're supposed to. This is a long post, maybe too verbose, but I'm hoping it will help some fledgling MSFS scenery designer who is going crazy trying to get their ILS to work properly. I am going to assume that someone reading this has at least a minimal familiarity with the XML file structure and data syntax used by the Asobo SDK.

I have built the minimum possible airport (1 runway, with 1 ILS) to demonstrate how the data in the XML file needs to be formatted so that the ILS works properly. The critical issue is that the Headings and Magvar (magnetic variation) values have to be input correctly, in a specific way, in each section:

1. Before you start on coding your airport, you need to obtain some data: the ground elevation and magnetic variation at the airport definition point (typically the geometric center of the runway, or group of runways.  You can't ignore this because the Sim is going to access magnetic variation from Navigraph every time it loads, so your airport coding has to include magnetic variation tags in a few specific places. The easiest to access source for this data is probably Little Nav Map - if you are dabbling with scenery design, you are advanced enough in this hobby that you probably already have it installed, and I'm going to assume that you do. I'll abbreviate it as "LNM" for the rest of this tutorial. Find your preferred location for this airport in LNM, make sure the Map Theme is set to "OpenTopoMap", and place the cursor on the spot where you want to build your airport. Look in the bottom right corner of the screen, and you will see the values for Latitude, Longitude, and (when you stop moving the mouse), the ground elevation. In the cell just to the right of the elevation, the magnetic variation will be shown, to the nearest 1/10 of a degree. Remember that East variation is a negative number, West variation is positive.

2. In the <Airport> section, you need a latitude, longitude, altitude, and region code, but no heading or magvar. While it is possible to put a magvar tag in this section (the compiler won't choke on it), the sim will ignore it since it is using on-line data, I assume from Navigraph, to build in magnetic variation for wherever it is you are building your airport or flying your plane.  Note that the airport test radius needs to be large enough to enclose all scenery elements in your airport. If you add something, for example a beacon tower on a nearby hill, you might need to increase the test radius.

3. In the <Runway> section of the XML file, the data for headings and magnetic variation have to be input in a particular way; if you mess this up, the ILS localizer won't line up with the runway, and/or the VOR/PFD indicators on the instrument panel in your plane won't behave the way they are supposed to. The Heading for the runway is measured from True (Geodetic) North. The Runway Number is the first 2 digits of the magnetic heading; for example, if the runway heading is 0°, and the magnetic variation you obtained in step 1 is 12.5° East, the Runway compass heading is 360-12.5=347.5°, so your Runway Number is "35". If the true heading if the runway is 210°, and variation is 8.2° West, you add them to get 218.2°, and the runway number would be "22". Runway numbers are 10° apart, so there are 36 possible numbers, and you round up or down to the closest one. If you want runway numbers that have a leading zero, for runways on magnetic headings between 0 and 94 degrees, add this tag to the <Markings> section: [leadingZeroIdent="TRUE"]. This is the standard for US Military airports, and Civilian airports in some parts of the world. Do not use the <magvar> tag in the Runway section.

4. In the <ILS> section, the Heading will be the magnetic heading of the runway centerline, which you calculated in the last step to determine the runway number. Again, this is the runway's Geodetic (measured from true north) heading, plus the magnetic variation if it's West, or minus the variation if it's East. The <magvar> value will be Variation you got from LNM. Again, don't forget the negative sign if the variation is East.

5. In the DME and Glideslope sections, you don't use either Heading or Magvar tags, but don't forget to set the glide slope pitch to your preferred value; this is usually 3° unless you need it steeper to clear some obstacle like a hill or tall structure in the approach path.

6. In the Runway Start sections, the Headings are Geodetic (true north), same as the Runway, and <magvar> tags are not used.

7. Approachs. For each ILS, there needs to be at least 1 Approach section in the XML file. If this is not included, aircraft autopilots and Flight Plans will not work properly with the ILS. Here is a sample of a 'minimal' Approach for a single runway airport with one ILS. This was generated by Jon Masterson's 'Airport Design Editor 20' software, included here as a sample:

------------------------------------------------------------------

        <Approach
            type="ILS"
            runway="00"
            designator="NONE"
            suffix="0"
            gpsOverlay="FALSE"
            fixType="TERMINAL_WAYPOINT"
            fixRegion="K2"
            fixIdent="FF00N"
            altitude="3100.0F"
            heading="0"
            missedAltitude="4100.0F">
            <ApproachLegs>
                <Leg
                    type="IF"
                    fixType="TERMINAL_WAYPOINT"
                    fixRegion="K2"
                    fixIdent="IF00N"
                    altitudeDescriptor="+"
                    altitude1="3100.0F"
                    />
                <Leg
                    type="CF"
                    fixType="TERMINAL_WAYPOINT"
                    fixRegion="K2"
                    fixIdent="FF00N"
                    flyOver="FALSE"
                    theta="0"
                    rho="0.0N"
                    magneticCourse="348.3"
                    distance="4.0N"
                    altitudeDescriptor="+"
                    altitude1="3100.0F"
                    />
                <Leg
                    type="CF"
                    fixType="RUNWAY"
                    fixRegion="K2"
                    fixIdent="RW00"
                    flyOver="FALSE"
                    theta="0"
                    rho="0.0N"
                    magneticCourse="348.3"
                    distance="6.0N"
                    altitudeDescriptor="A"
                    altitude1="1051.0F"
                    />
            </ApproachLegs>
            <MissedApproachLegs>
                <Leg
                    type="CF"
                    fixType="TERMINAL_WAYPOINT"
                    fixRegion="K2"
                    fixIdent="HH00N"
                    flyOver="FALSE"
                    theta="0"
                    rho="0.0N"
                    magneticCourse="348.3"
                    distance="10.0N"
                    />
                <Leg
                    type="HM"
                    fixType="TERMINAL_WAYPOINT"
                    fixRegion="K2"
                    fixIdent="HH00N"
                    turnDirection="R"
                    magneticCourse="348.3"
                    time="1"
                    />
            </MissedApproachLegs>
        </Approach>
        <Waypoint
            lat="35.9208932772687"
            lon="-117.257150799828"
            waypointRegion="K2"    
            waypointType="UNNAMED"
            magvar="-11.7"
            waypointIdent="IF00N">
        </Waypoint>
        <Waypoint
            lat="35.9875599127261"
            lon="-117.257150799828"
            waypointRegion="K2"    
            waypointType="UNNAMED"
            magvar="-11.7"
            waypointIdent="FF00N">
        </Waypoint>
        <Waypoint
            lat="36.2761702887753"
            lon="-117.257150799828"
            waypointRegion="K2"    
            waypointType="UNNAMED"
            magvar="-11.7"
            waypointIdent="HH00N">
        </Waypoint>

----------------------------------------------

8. Unfortunately, ADE20 is "retired" software. The last version, Alpha_21, is now 3 years old and as far as I know, there was never a Beta Test or Stable Release version. The built-in compiler has never worked for me - maybe it's not compatible with Windws 11? So I have to export an XML file from ADE and use the Asobo compiler in DevMode in the Sim. ADE-Alpha_21 has some significant bugs that produce XML files which can cause compiler errors with the Asobo BGL compiler, but these errors can usually be corrected by manually editing the XML and re-building, until you eventually get a successfully built package that can be copied to your Community folder. In the above section, the 'waypointRegion' tags have to be manually added to each waypoint; ADE20 didn't include them, and the Asobo compiler will throw an error code and abort if they're not there. Actually, there are several ADE20 scenery element types that can cause problems with the Asobo compiler, because it expects region codes and ADE sometimes doesn't include them in it's XML file output. Look carefully at the error listing in the Compiler Console window (this is in MSFS when it's in Developer Mode), and you can usually suss out what the problem is, correct the XML file, and re-compile. It might take several re-tries, each time correcting another glitch or spelling error, or adding a missing data element, but eventually you'll get a clean compile if you persevere. Note that Asobo's compiler seems to be persnickety about "case sensitivity" in element tag naming; for instance [waypointRegion] and [waypointType] have to be spelled exactly as shown, with the 'w' and 'p' in lower case, and the 'R' and 'T' capitalized, or the compiler throws an error code. Good luck! This is a lot of work, but when you finally get it right, and you make that first perfect ILS approach on autopilot to an airport you created, it's worth it!

Edited by lgcharlot
corrected a couple of spelling errors

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.