Main Content

Aero.FlightGearAnimation

Construct FlightGear animation object

Syntax

h = Aero.FlightGearAnimation

Description

h = Aero.FlightGearAnimationconstructs a FlightGear animation object. The FlightGear animation object is returned toh.

Limitations

These capabilities are not available forAerospace ToolboxOnline:

Constructor

Method Description

fganimation

Construct FlightGear animation object.

Method Summary

Method Description

ClearTimer

Clear and delete timer for animation of FlightGear flight simulator.

delete

Destroy FlightGear animation object.

GenerateRunScript

Generate run script for FlightGear flight simulator.

initialize

Set up FlightGear animation object.

play

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

SetTimer

Set name of timer for animation of FlightGear flight simulator.

update

Update position data to FlightGear animation object.

wait

Wait until animation is done playing

财产Summary

Properties Description

TimeSeriesSource

Specify variable that contains the time series data.

TimeSeriesSourceType

指定的时间序列数据存储类型d in'TimeSeriesSource'. Five values are available. They are listed inTimeSeriesSourceType Properties. The default value is'Array6DoF'.

TimeseriesReadFcn

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

TimeScaling

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

FramesPerSecond

Specify the number of frames per second used to animate the'TimeSeriesSource'. The default value is12frames per second.

OutputFileName

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.

FlightGearBaseDirectory

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.

GeometryModelName

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

DestinationIpAddress

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

DestinationPort

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'.

AirportId

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

RunwayId

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

InitialAltitude

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

InitialHeading

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

OffsetDistance

Specify the offset distance of the aircraft from the airport, in miles. The default value is4.72miles.

OffsetAzimuth

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

TStart

Specify start time as a double.

TFinal

Specify end time as a double.

Architecture

Specify the architecture the FlightGear software is running on.GenerateRunScripttakes this setting into account when generating the bash run script to start FlightGear. The platforms are listed inArchitecture Properties. 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:

TimeSeriesSourceType Properties

财产 Description

'Timeseries'

MATLABtimeseriesdata with six values per time:

lat lon alt phi theta psi

The values are resampled.

'Timetable'

MATLABtimetabledata with six values per time:

lat lon alt phi theta psi

The values are resampled.

'StructureWithTime'

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 usinginterp1.

'Array6DoF'

A double-precision array innrows 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.

'Array3DoF'

A double-precision array innrows 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.

'Custom'

Position and angle data is retrieved from'TimeSeriesSource'由currently registered'TimeseriesReadFcn'.

Specify one of these values for theArchitectureproperty:

Architecture Properties

财产 Description

'Default'

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

“Win64”

Windows®(64-bit) architecture.

'Mac'

Mac OS X(64-bit) architecture.

“Linux”

Linux®(64-bit) architecture.

'Default'

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

“Win64”

Windows (64-bit) architecture.

'Mac'

Mac OS X(64-bit) architecture.

“Linux”

Linux (64-bit) architecture.

Examples

Construct a FlightGear animation object,h:

h = fganimation

Version History

Introduced in R2007a