Documentation Center

  • 評価版
  • 製品アップデート

MATLAB Animation

Create six-degrees-of-freedom multibody custom geometry block

Library

Animation/MATLAB-Based Animation

Description

The MATLAB Animation block creates a six-degrees-of-freedom multibody custom geometry block based on the Aero.Animation object. This block animates one or more vehicle geometries with x-y-z position and Euler angles through the specified bounding box, camera offset, and field of view. This block expects the rotation order z-y-x (psi, theta, phi).

To update the camera parameters in the animation, first set the parameters then close and double-click the block to reopen the MATLAB® Animation window.

To access the dialog box for this block, right-click the block, then select Mask Parameters. Alternatively, double-click the block to display the MATLAB Animation window, then click the Block Parameters icon.

    Note:   The underlying graphics system stores values in single precision. As a result, you might notice that motion at coordinate positions greater than approximately 1e6 appear unstable. This is because a single-precision number has approximately six digits of precision. The instability is due to quantization at the local value of the eps MATLAB function. To visualize more stable motion for coordinates beyond 1e6, either offset the input data to a local zero, or scale down the coordinate values feeding the visualization.

Dialog Box

Vehicles

Specifies the vehicle to animate. From the list, select from 1 to 10. The block mask inputs change to reflect the number of vehicles you select. Each vehicle has its own set of inputs, denoted by the number at the beginning of the input label.

Geometries

Specifies the vehicle geometries. You can specify these geometries using one of the following:

  • Variable name, for example geomVar

  • Cell array of variable names, for example {geomVar, AltGeomVar}

  • String with single quotes, for example, 'astredwedge.mat'

  • Mixed cell array of variable names and strings, for example {'file1.mat', 'file2.mat', 'file3.ac', geomVar}

    Note:   All specified geometries specified must exist in the MATLAB workspace and file names must exist in the current folder or be on the MATLAB path.

Bounding box coordinates

Specifies the boundary coordinates for the vehicle.

This parameter is not tunable during simulation. A change to this parameter takes effect after simulation stops.

Camera offset

Specifies the distance from the camera aim point to the camera itself.

This parameter is not tunable during simulation. A change to this parameter takes effect after simulation stops.

Camera view angle

Specifies the camera view angle. By default, the camera aim point is the position of the first body lagged dynamically to indicate motion.

This parameter is not tunable during simulation. A change to this parameter takes effect after simulation stops.

Sample time

Specify the sample time (-1 for inherited).

Inputs and Outputs

This block has the following inputs:

InputDimension TypeDescription

First

Vector

Contains the downrange position, the crossrange position, and the altitude of the vehicle in Earth coordinates. The number indicates the vehicle number.

Second

Vector

Contains the Euler angles (roll, pitch, and yaw) of the vehicle. The number indicates the vehicle number.

See Also

Aero.Animation in the Aerospace Toolbox documentation

Was this topic helpful?