Main Content

Flight Simulator Interface

About the FlightGear Interface

The Aerospace Blockset™ product supports an interface to the third-party FlightGear flight simulator, open-source software available through a GNU General Public License (GPL). The FlightGear flight simulator interface included with the blockset is a unidirectional transmission link from the Simulink® interface to FlightGear using the FlightGear published net_fdm binary data exchange protocol. Data is transmitted via UDP network packets to a running instance of FlightGear. The blockset supports multiple standard binary distributions of FlightGear. See Run FlightGear with Simulink Models for interface details.

FlightGear is a separate software entity not created, owned, or maintained by bat365.

  • To report bugs in or request enhancements to the Aerospace Blockset FlightGear interface, contact bat365 technical support at /support/contact_us.html.

  • To report bugs or request enhancements to FlightGear itself, visit FlightGear website.

Supported FlightGear Versions

The Aerospace Toolbox product supports FlightGear versions starting from v2.6.

If you are using a FlightGear version older than 2.6, update your FlightGear installation to a supported version. When you open the model, the software returns a warning or error. Obtain updated FlightGear software from https://www.flightgear.org in the download area.

Obtain FlightGear

You can obtain FlightGear from the FlightGear website in the download area or by ordering CDs from FlightGear. The download area contains extensive documentation for installation and configuration. Because FlightGear is an open-source project, source downloads are also available for customizing and porting to custom environments.

Configure Your Computer for FlightGear

To use FlightGear, you must have a high-performance graphics card with stable drivers For more information, see the FlightGear CD distribution or the hardware requirements and documentation areas of the FlightGear website.

FlightGear performance and stability can be sensitive to computer video cards, driver versions, and driver settings. You need OpenGL® support with hardware acceleration activated. Without proper setup, performance can drop from about a 30 frames-per-second (fps) update rate to less than 1 fps. If your system allows you to update OpenGL settings, modify them to improve performance.

Graphics Recommendations for Windows

For Windows® systems, use these graphics recommendations:

  • A graphics card with acceptable OpenGL performance (as outlined at the FlightGear website).

  • The latest tested and stable driver release for your video card. Test the driver thoroughly on a few computers before deploying to others.

For more information, see FlightGear Hardware Recommendations.

Setup on Linux, Macintosh, and Other Platforms

FlightGear distributions are available for Linux®, Macintosh, and other platforms from the FlightGear website, https://www.flightgear.org. Installation on these platforms, like Windows, requires careful configuration of graphics cards and drivers. Consult the documentation and hardware requirements sections at the FlightGear website.

FlightGear and Video Cards in Windows Systems

Your computer built-in video card, such as NVIDIA® cards, can conflict with FlightGear shaders. Consider this workaround:

  • Disable the FlightGear shaders by selecting the Generate Run Script block Disable FlightGear shader options check box.

Install and Start FlightGear

The extensive FlightGear documentation guides you through the installation in detail. Consult these notes:

Keep these points in mind:

  • Configure your computer graphics card before you install FlightGear. See the preceding section, Configure Your Computer for FlightGear.

  • Shut down all running applications (including the MATLAB interface) before installing FlightGear.

  • Install FlightGear in a folder path name composed of ASCII characters.

  • bat365 tests indicate that the operational stability of FlightGear is especially sensitive during startup. It is best not to move, resize, mouse over, overlap, or cover up the FlightGear window until the initial simulation scene appears after the startup splash screen fades out.

Aerospace Blockset supports FlightGear on several platforms. This table lists the properties to consider before you start to use FlightGear.

FlightGear PropertyFolder DescriptionPlatformsTypical Location
FlightGearBaseDirectoryFlightGear installation folder. Windows 64-bitC:\Program Files\FlightGear
(default)
LinuxFolder into which you installed FlightGear
Mac/Applications
(folder to which you dragged the FlightGear icon)
GeometryModelNameModel geometry folderWindows 64-bitC:\Program Files\FlightGear\data\Aircraft\HL20
(default)
Linux$FlightGearBaseDirectory/data/Aircraft/HL20
Mac$FlightGearBaseDirectory/FlightGear.app/Contents/Resources/data/Aircraft/HL20

Install Additional FlightGear Scenery

When you install the FlightGear software, the installation provides a basic level of scenery files. The FlightGear documentation guides you through installing scenery as part the general FlightGear installation.

If you need to install more FlightGear scenery files, see the instructions at https://www.flightgear.org. The instructions describe how to install the additional scenery in a default location. bat365® recommends that you follow those instructions.

If you install additional scenery in a nonstandard location, you may need to update the FG_SCENERY environment variable in the script output from the Generate Run Script block to include the new path. For a description of the FG_SCENERY variable, see the documentation at https://www.flightgear.org.

If you do not download scenery in advance, you can direct FlightGear to download it automatically during simulation by selecting the Generate Run Script block Install FlightGear scenery during simulation (requires Internet connection) check box.

For Windows systems, you may encounter an error message while launching FlightGear with the InstallScenery option enabled:

Error creating directory: No such file or directory

This error likely indicates that your default FlightGear download folder is not writeable, the path cannot be resolved, or the path contains UNC path names. To work around the issue, edit the runfg.bat file to specify a new folder path to store the scenery data:

  1. Edit runfg.bat.

  2. To the list of command options, append --download-dir= and specify a folder to which to download the scenery data. For example:

    --download-dir=C:\Users\user1\Documents\FlightGear

    All data downloaded during this FlightGear session is saved to the specified directory. To avoid downloading duplicate scenery data, use the same directory in succeeding FlightGear sessions

  3. To open FlightGear, run runfg.bat.

Note

Each time that you run the Generate Run Script block, it creates a new script. It overwrites any edits that you have added.

See Also

| | | | |

Related Topics

External Websites