Main Content

Aero.FlightGearAnimation

Construct FlightGear animation object

    Description

    The Aero.flightGearAnimation constructs a FlightGear animation object to visualize flight data using FlightGear flight simulator.

    Creation

    Description

    h = Aero.FlightGearAnimation creates a FlightGear animation object h.

    example

    Properties

    expand all

    Variable that contains the time series data, specified as a MATLAB® array.

    Type of time series data stored in 'TimeSeriesSource', specified as one of 'Timeseries', 'Array6DoF', 'Array3DoF', 'StructureWithTime', 'Timetable', or 'Custom'.

    • 'Timeseries' – MATLAB timeseries data with six values per time: lat lon alt phi theta psi

      The values are resampled.

    • 'Timetable' – MATLAB timetable data with six values per time: lat lon alt phi theta psi

      The values are resampled.

    • 'StructureWithTime' – Simulink® struct with time:

      • signals(1).values: lat lon alt

      • signals(2).values: phi theta psi

    • 'Timetable' – MATLAB timetable data with six values per time: lat lon alt phi theta psi

      The values are resampled.

    • 'Array6DoF' – 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.

    • 'Array3DoF' – 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.

    • 'Array3DoF' – 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.

    • 'Custom' – Position and angle data is retrieved from 'TimeSeriesSource' by the currently registered 'TimeseriesReadFcn'.

    Data Types: string

    Function to read time series data when 'TimeSeriesSourceType' value is 'Custom'.

    Data Types: function_handle

    Seconds of animation data per second of wall-clock time, specified as a positive real scalar.

    Data Types: double

    Number of frames per second used to animate the 'TimeSeriesSource', specified as a positive real scalar.

    Data Types: double

    Name of the output file, specified as a string. The file name is the name of the command you will use to start FlightGear with these initial parameters.

    Note

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

    Data Types: string

    Name of FlightGear installation folder, specified as a string.

    Note

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

    Data Types: string

    Name of the folder containing the desired model geometry in the FlightGear\data\Aircraft folder.

    Data Types: string

    Destination IP address, specified as a string.

    Data Types: string

    Network flight dynamics model (FDM) port, specified as a string.

    Data Types: string

    Airport ID, specified as a string. The list of supported airports is available in the FlightGear interface, under Location.

    Data Types: string

    Runway ID, specified as a string.

    Initial altitude of the aircraft, in feet, specified as a real positive scalar.

    Data Types: double

    Initial heading of the aircraft, in degrees, specified as a real positive scalar.

    Data Types: double

    Offset distance of the aircraft from the airport, in miles, specified as a real positive scalar.

    Data Types: double

    Offset azimuth of the aircraft, in degrees, specified as a real positive scalar.

    Data Types: double

    Start time of the aircraft, specified as a real positive scalar.

    Data Types: double

    End time of the aircraft, specified as a real positive scalar.

    Dependencies

    Comparison of values of TStart and TFinal:

    • Must be numeric.

    • Cannot be Inf or NaN.

    • TFinal must be greater than or equal to TStart.

    • TFinal cannot be greater than the maximum of the timeseries time.

    • TStart cannot be less than the minimum of the timeseries time.

    Direct FlightGear to automatically install required scenery while the simulator is running. This property requires a steady internet connection. For Windows® systems, you may encounter an error message while launching FlightGear with this option enabled. For more information, see Installing Additional FlightGear Scenery.

    Data Types: logical

    Deactivate FlightGear shader options. Your computer built-in video card, such as NVIDIA® cards, can conflict with FlightGear shaders. Consider using this property if you have this conflict.

    Data Types: logical

    Architecture the FlightGear software is running on, specified as one of 'Win64' , 'Linux', 'Mac', 'MacARM', or 'Default'. GenerateRunScript generates the bash run script to start FlightGear based on the architecture specified. The platforms are:

    • 'Default' – 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.

    • 'Win64' – Windows (64-bit) architecture.

    • 'Mac'Mac OS X (64-bit) architecture.

    • 'Linux' – Linux® (64-bit) architecture.

    .

    Object Functions

    ClearTimerClear and delete timer for animation of FlightGear flight simulator
    deleteDestroy FlightGear animation object
    GenerateRunScriptGenerate run script for FlightGear flight simulator
    SetTimerSet name of timer for animation of FlightGear flight simulator
    initializeSet up FlightGear animation object
    updateUpdate position data to FlightGear animation object
    playAnimate FlightGear flight simulator using given position/angle time series
    waitWait until animation is done playing

    Examples

    collapse all

    This example shows how to initialize the animation object, h.

    h = Aero.FlightGearAnimation;
    h.initialize();

    Limitations

    FlightGear is not supported in MATLAB Online™.

    Version History

    Introduced in R2007a