Documentation Center

  • Trial Software
  • Product Updates

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 the Simulink Models for interface details.

FlightGear is a separate software entity neither created, owned, nor maintained by MathWorks.

Supported FlightGear Versions

The Aerospace Blockset product supports the following FlightGear versions:

  • v2.0

  • v2.4

  • v2.6

  • v2.8

  • v2.10

  • v2.12

You can use Aerospace Blockset Upgrade Advisor checks to identify the blocks in your model that refer to FlightGear versions that the software no longer supports, or that are outdated and will not be supported in a future release. For more information, see Check model and local libraries for legacy Aerospace Blockset blocks.

Obtain FlightGear

You can obtain FlightGear from www.flightgear.org 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

You must have a high-performance graphics card with stable drivers to use FlightGear. For more information, see the FlightGear CD distribution or the hardware requirements and documentation areas of the FlightGear Web site, www.flightgear.org.

MathWorks tests of FlightGear performance and stability indicate sensitivity to computer video cards, driver versions, and driver settings. You need OpenGL® support with hardware acceleration activated. The OpenGL settings are particularly important. 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® users, use the following graphics recommendations:

  • A graphics card with acceptable OpenGL performance (as outlined at the FlightGear Web site, www.flightgear.org).

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

    For Microsoft® Windows XP systems running on x86 (32-bit) or AMD-64/EM64T chip architectures, the graphics card operates in the unprotected kernel space known as Ring Zero. Problems in the driver can cause the Windows operating system to lock or crash. Before buying a large number of computers for 3-D applications, with your vendor, test one or two computers to find a combination of hardware, operating system, drivers, and settings that are stable for your applications.

For more information, see FlightGear Hardware Recommendations.

Set Up OpenGL Graphics on Windows

For complete information on OpenGL settings, refer to the documentation at the OpenGL Web site: www.opengl.org.

If your system allows you to modify OpenGL, perform steps like the following to optimize your video card settings. Your driver's panes might look different.

  1. Ensure that you have activated the OpenGL hardware acceleration on your video card. On Windows, access this configuration through Start > Settings > Control Panel > Display, which opens the following dialog box. Select the Settings tab.

  2. Click the Advanced button in the lower right of the dialog box, which brings up the graphics card's custom configuration dialog box, and go to the OpenGL tab. For an ATI Mobility Radeon 9000 video card, the OpenGL pane looks like this:

  3. For best performance, move the Main Settings slider near the top of the dialog box to the Performance end of the slider.

  4. If stability is a problem, try other screen resolutions, other color depths in the Displays pane, and other OpenGL acceleration modes.

Many cards perform much better at 16 bits-per-pixel color depth (also known as 65536 color mode, 16-bit color). For example, on an ATI Mobility Radeon 9000 running a given model, 30 fps are achieved in 16-bit color mode, while 2 fps are achieved in 32-bit color mode.

Setup on Linux, Macintosh, and Other Platforms

FlightGear distributions are available for Linux®, Macintosh, and other platforms from the FlightGear Web site, 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 Web site.

Install and Start FlightGear

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

Keep the following points in mind:

  • Configure your computer's 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.

  • MathWorks tests indicate that the operational stability of FlightGear is especially sensitive during startup. It is best to not 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 a number of platforms (http://www.mathworks.com/products/aeroblks/requirements.html). The following table lists the properties you should be aware of before you start to use FlightGear.

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

Was this topic helpful?