This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Construct FlightGear animation object


h = Aero.FlightGearAnimation


h = Aero.FlightGearAnimation constructs a FlightGear animation object. The FlightGear animation object is returned to h.




Construct FlightGear animation object.

Method Summary



Clear and delete timer for animation of FlightGear flight simulator.


Destroy FlightGear animation object.


Generate run script for FlightGear flight simulator.


Set up FlightGear animation object.


Animate FlightGear flight simulator using given position/angle time series.


Set name of timer for animation of FlightGear flight simulator.


Update position data to FlightGear animation object.

Property Summary



Specify variable that contains the time series data.


Specify the type of time series data stored in 'TimeseriesSource'. Five values are available. They are listed in the 'TimeseriesSourceType' property table. The default value is 'Array6DoF'.


Specify a function to read the time series data if 'TimeseriesSourceType' is 'Custom'.


Specify the seconds of animation data per second of wall-clock time. The default ratio is 1.


Specify the number of frames per second used to animate the 'TimeseriesSource'. The default value is 12 frames per second.


Select your FlightGear software version: v2016.3, v2016.1, v3.4, v3.2, v3.0, v2.12, v2.10, v2.8, v2.6, v2.4, or '2.0'. The default version is the latest version.

    Note:   If you are using a FlightGear version older than 2.0, the software returns a warning when you use the initialize method. Consider upgrading your FlightGear version. For more information, see Supported FlightGear Versions.


Specify the name of the output file. The file name is the name of the command you will use to start FlightGear with these initial parameters. The default value is 'runfg.bat'.

    Note:   The run script file name must be composed of ASCII characters.


Specify the name of your FlightGear installation folder. The default value is 'D:\Applications\FlightGear'.

    Note:   FlightGear must be installed in a folder path name composed of ASCII characters.


Specify the name of the folder containing the desired model geometry in the FlightGear\data\Aircraft folder. The default value is 'HL20'.


Specify your destination IP address. The default value is ''.


Specify your network flight dynamics model (fdm) port. This destination port should be an unused port that you can use when you launch FlightGear. The default value is '5502'.


Specify the airport ID. The list of supported airports is available in the FlightGear interface, under Location. The default value is 'KSFO'.


Specify the runway ID. The default value is '10L'.


Specify the initial altitude of the aircraft, in feet. The default value is 7224 feet.


Specify the initial heading of the aircraft, in degrees. The default value is 113 degrees.


Specify the offset distance of the aircraft from the airport, in miles. The default value is 4.72 miles.


Specify the offset azimuth of the aircraft, in degrees. The default value is 0 degrees.


Specify start time as a double.


Specify end time as a double.


Specify the architecture the FlightGear software is running on. GenerateRunScript takes this setting into account when generating the bash run script to start FlightGear. The platforms are listed in the 'Architecture' table. The default value is 'Default'.

The time series data, stored in the property 'TimeseriesSource', is interpreted according to the 'TimeseriesSourceType' property, which can be one of:


MATLAB time series data with six values per time:

lat lon alt phi theta psi

The values are resampled.


Simulink struct with time (for example, Simulink root outport logging 'Structure with time'):

  • signals(1).values: lat lon alt

  • signals(2).values: phi theta psi

Signals are linearly interpolated vs. time using interp1.


A double-precision array in n rows and 7 columns for 6-DoF data: time lat lon alt phi theta psi. If a double-precision array of 8 or more columns is in 'TimeseriesSource', the first 7 columns are used as 6-DoF data.


A double-precision array in n rows and 4 columns for 3-DoF data: time lat alt theta. If a double-precision array of 5 or more columns is in 'TimeseriesSource', the first 4 columns are used as 3-DoF data.


Position and angle data is retrieved from 'TimeseriesSource' by the currently registered 'TimeseriesReadFcn'.

Specify one of these values for the Architecture property:


Architecture the MATLAB® software is currently running on. If the property has this value, GenerateRunScript creates a bash file that can work in the architecture that MATLAB is currently running on.


Windows® (32-bit) architecture.


Windows (64-bit) architecture.


Mac OS X (64-bit) architecture.


Linux® (64-bit) architecture.


Construct a FlightGear animation object, h:

h = fganimation

Introduced in R2007a

Was this topic helpful?