• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS20 MSFS ATC airspaces modification

Messages
99
Hello guys,

Have you tried to explore MSFS airspace files?
These files are located here: \\MSFS\Official\OneStore\fs-base-nav\scenery\world\

1614518634_.png.5e1b5eb864d8660282fced9e66bf5af3.png
I only know that Little Navmap can read this data from MSFS, but not possible to edit.
Would be nice to open these files to modify, because actual airspace areas are incomplete. But no idea, which program can do this.

Regards
 
Hello!!
I'm currently stuck with the same problem but for FSX, if I find something I'll make sure to let you know!!
Good dayyy
 
Hi,

This is a very good question!

I am able to extract the BoundariesRestricted.BGL and other Boundaries.BGL files to .XML using the msfsbglxml converter found here: https://www.fsdeveloper.com/forum/threads/msfsbglxml-convert-msfs-2020-bgl-files-to-xml.450677/

The generated XML can be edited but I am unable to recompile the XML to BGL file (text sample below).

I tried using the MSFS2020 internal compiler by loading the Sample project 'SimpleNavData' and pasting the XML code from BoundariesRestricted.BGL into the SimpleNavData.XML but only get compile errors (see pic).

.
compile errors.png


I have also tried using the FSX BGLC compiler and am unable to get the XML to re-compile.

Does anybody have any ideas how these airspace.BGL files were created and how to re-compile to XML into the correct format?
 

Attachments

Last edited:
This is actually an example of restricted, not danger. I think this works:
XML:
<?xml version="1.0" encoding="utf-8"?>
<FSData version="9.0">

  <Boundary type="RESTRICTED" name="POINT COOK MIL FLYING">
    <BoundaryStart lat="-37.92833346873522" lon="144.80000004172325" altitudeMinimum="0.0F" minimumAltitudeType="ABOVE_GROUND_LEVEL" altitudeMaximum="2500.0F" maximumAltitudeType="ABOVE_GROUND_LEVEL" />
    <Line lat="-37.9116665571928" lon="144.69583332538605" />
    <Origin lat="-37.932222336530685" lon="144.7533331811428"/>
    <Arc index="0" type="CLOCKWISE" lat="-37.96611104160547" lon="144.80000004172325" />
    <Line lat="-37.92833346873522" lon="144.80000004172325" />
  </Boundary>

  <Boundary type="RESTRICTED" name="POINT COOK MIL FLYING">
    <BoundaryStart lat="-37.9116665571928" lon="144.69583332538605" altitudeMinimum="0.0F" minimumAltitudeType="ABOVE_GROUND_LEVEL" altitudeMaximum="4500.0F" maximumAltitudeType="ABOVE_GROUND_LEVEL" />
    <Line lat="-37.92833346873522" lon="144.80000004172325" />
    <Line lat="-37.96611104160547" lon="144.80000004172325" />
    <Origin lat="-37.932222336530685" lon="144.7533331811428"/><Origin lat="-37.932222336530685" lon="144.7533331811428"/>
    <Arc index="0" type="CLOCKWISE" lat="-37.9116665571928" lon="144.69583332538605" />
  </Boundary>

</FSData>

It's not Vertex, but Line. And Origin has no index.
 
Here's some definitions from bglcomp.xsd:
XML:
<xs:complexType name="ctBoundary">
    <xs:sequence>
        <xs:group ref="grpBoundaryChildren" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="type" form="unqualified" type="stBoundaryType" />
    <xs:attribute name="name" form="unqualified" type="stString48" />
</xs:complexType>

<xs:group name="grpBoundaryChildren">
    <xs:choice>
        <xs:element name="Com" type="ctCom" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Origin" type="ctVertexLL" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Circle" type="ctCircle" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="BoundaryStart" type="ctStartBoundary" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Line"  type="ctVertexLL" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="Arc" type="ctArc" minOccurs="0" maxOccurs="unbounded" />
    </xs:choice>
</xs:group>

<xs:complexType name="ctStartBoundary">
    <xs:attribute name="lat" form="unqualified" type="stLatitude" />
    <xs:attribute name="lon" form="unqualified" type="stLongitude" />
    <xs:attribute name="altitudeMinimum" form="unqualified" type="stAltitude" />
    <xs:attribute name="minimumAltitudeType" form="unqualified" type="stAltitudeType" />
    <xs:attribute name="altitudeMaximum" form="unqualified" type="stAltitude" />
    <xs:attribute name="maximumAltitudeType" form="unqualified" type="stAltitudeType" />
</xs:complexType>

<xs:complexType name="ctArc">
    <xs:attribute name="index" form="unqualified" type="xs:nonNegativeInteger" />
    <xs:attribute name="type" form="unqualified" type="stArcDirection" />
    <xs:attribute name="lat" form="unqualified" type="stLatitude" />
    <xs:attribute name="lon" form="unqualified" type="stLongitude" />
</xs:complexType>

<xs:complexType name="ctCircle">
    <xs:attribute name="index" form="unqualified" type="xs:nonNegativeInteger" />
    <xs:attribute name="radius" form="unqualified" type="stDistance" />
    <xs:attribute name="altitudeMinimum" form="unqualified" type="stAltitude" />
    <xs:attribute name="minimumAltitudeType" form="unqualified" type="stAltitudeType" />
    <xs:attribute name="altitudeMaximum" form="unqualified" type="stAltitude" />
    <xs:attribute name="maximumAltitudeType" form="unqualified" type="stAltitudeType" />
</xs:complexType>
 
Thank you, corrected to Restricted. I have managed to recompile the code above using BGLComp.exe using command in the DOS prompt but it may not be in the correct format for MSFS2020.
I cannot however de-compile and re-compile any of the full BoundaryBgl files as per below, only get errors.

I opened this can of worms when I was trying to work out where the Garmin GPS GNS530 etc gets its Airspace Data from. The default and (PMS-50 MOD) do not show all the airspace on the GPS Map, for example Danger area displayed in World Map but not on the GPS in Sim. Hopefully at some point more information in the SDK on these files.

Boundaries_BGL.PNG
Airspace_MELB.PNG
 
The code I displayed was for MSFS. You can't recompile the code decompiled by msfsbglxml because it contains the errors I pointed out earlier. It's not Vertex, but Line. And Origin has no index.
Attached is a zip file of the BoundariesRestricted.xml with the msfsbglxml errors corrected.
 

Attachments

Last edited:
Ok I understand now. I was able to build the package in MSFS2020 using the code that you posted in the .ZIP and it compiles back same as the original BGL (replaced the code in the SimpleNavData xml SDK sample).

The XML code extracted using msfsbglxml needs to have all 'Vertex Lat' replaced with 'Line Lat' and remove all the 'index= ' entries from 'Origin lat' code as you previously stated. My mistake was assuming msfsbglxml would convert into correct MSFS2020 format and didn't double check. Thanks rhumbaflappy!

Boundaries_NavData.PNG
 
A bit late in the game here but assuming that things haven't changed much: :)

Did anyone have success in setting up new airways?

  • From what I gathered they seem to be stored inside the latest AIRAC Cycle: fs-base-nav\scenery\world\AIRACCycle.bgl
    Unfortunately this type of BGL cannot be decompiled using the tool mentioned above.
  • Based on what the SDK returned when building a project I could find out the following syntax elements but nothing beyond:
    Code:
    <AiracCyclecycleBegin="0"
    cycleEnd="100000"
    cycleNumber="1"
    />
  • ChatGPT says the following is the correct syntax, which seems to be complete nonsense:
    Code:
    <Airway name="G440" type="LOW">
      <Route>
        <Waypoint ident="ABC01" />
        <Waypoint ident="DEF02" />
      </Route>
    </Airway>[CODE]
    [/LIST]
 
Did anyone have success in setting up new airways?

This is an extremely complicated and tedious task to do manually.... do you know how to do it yourself?


<xs:complexType name="ctRoute">
<xs:sequence>
<xs:element name="Previous" type="ctPreviousNext" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Next" type="ctPreviousNext" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" form="unqualified" type="xs:string" />
<xs:attribute name="routeType" form="unqualified" type="stRouteType" />
</xs:complexType>

1749743760706.png
 
Wow, that code works, thank you! I'm only covering a limited area that doesn't have any data in the AiracCycles this these are coming in pretty handy.
I understand that more than 1 route can be defined per Waypoint. Only questions remaining at this stage are:

  • Is there more than one route required each? Meaning if I only create Route->Next from Waypoint A to B, will that suffice for the airway to be flown in two directions or are they treated as "oneway streets" making a route in each direction necessary?
  • How can I review the routes created in MSFS? I tried LittleNavMap but apparently it only loads addon airports, no addon waypoints, VORs and routes/airways.
 
Back
Top