Introducing the Flight Simulator Interface

About the FlightGear Interface

The Aerospace Blockset™ product supports an interface to the third-party FlightGear flight simulator, an open source software package 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 FlightGear's 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 Running FlightGear with the Simulink® Models following for interface details.

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

Obtaining 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 customization and porting to custom environments.

Configuring 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's performance and stability indicate significant 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.

Graphics Recommendations for Windows

The MathWorks recommends the following for Windows® users:

Setting Up OpenGL® Graphics on Windows

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

Follow these steps 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 UNIX® 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.

Using MATLAB® Graphics Controls to Configure Your OpenGL® Settings

You can also control your OpenGL rendering from the MATLAB® command line with the MATLAB Graphics opengl command. Consult the opengl command reference for more information.

Installing and Starting FlightGear

The extensive FlightGear documentation guides you through the installation in detail. Consult the documentation section of the FlightGear Web site for complete installation instructions: www.flightgear.org.

Keep the following points in mind:

Aerospace Toolbox supports FlightGear on a number of platforms (http://www.mathworks.com/products/aerotb/requirements.html). The following table lists the properties you should be aware of before you start to use FlightGear.

FlightGear PropertyDirectory DescriptionPlatformsTypical Location
FlightGearBaseDirectoryFlightGear installation directory. WindowsC:\Program Files\FlightGear
(default)
Solaris™ or LinuxDirectory into which you installed FlightGear
Mac®/Applications
(directory to which you dragged the FlightGear icon)
GeometryModelNameModel geometry directoryWindowsC:\Program Files\FlightGear\data\Aircraft\HL20
(default)
Solaris or Linux$FlightGearBaseDirectory/data/Aircraft/HL20
Mac$FlightGearBaseDirectory/FlightGear.app/Contents/Resources/data/Aircraft/HL20

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS