Main Content


Create body object for use with animation object


h = Aero.Body


h = Aero.Body constructs a body for an animation object. The animation object is returned in h. To use the Aero.Body object, you typically:

  1. Create the animation body.

  2. Configure or customize the body object.

  3. Load the body.

  4. Generate patches for the body (requires an axes from a figure).

  5. Set time series data source.

  6. Move or update the body.

By default, an Aero.Body object natively uses aircraft x-y-z coordinates for the body geometry and the time series data. It expects the rotation order z-y-x (psi, theta, phi).

Convert time series data from other coordinate systems on the fly by registering a different CoordTransformFcn function.

Constructor Summary

BodyConstruct body object for use with animation object.

Method Summary

findstartstoptimesReturn start and stop times of time series data.
generatePatchesGenerate patches for body with loaded face, vertex, and color data.
loadGet geometry data from source.
moveChange Aero.Body position and orientation.
updateChanges body position and orientation versus time data.

Property Summary

CoordTransformFcnSpecify a function that controls the coordinate transformation.Character vector | string
NameSpecify name of body. 
PositionSpecify position of body.MATLAB array
RotationSpecify rotation of body.MATLAB array
GeometrySpecify geometry of body.handle
PatchGenerationFcnSpecify patch generation function.MATLAB array
PatchHandlesSpecify patch handles.MATLAB array
ViewingTransformSpecify viewing transform.MATLAB array
TimeSeriesSourceSpecify time series source.MATLAB array
TimeSeriesSourceTypeSpecify the type of time series data stored in 'TimeSeriesSource'. Five values are available. They are listed in TimeSeriesSourceType Properties. The default value is 'Array6DoF'. Character vector | string
TimeseriesReadFcnSpecify time series read function.MATLAB array

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

TimeSeriesSourceType Properties


MATLAB timeseries data with six values per time:

x y z phi theta psi

The values are resampled.


MATLAB timetable data with six values per time:

x y z phi theta psi

The values are resampled.


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

  • signals(1).values: x y z

  • signals(2).values: phi theta psi

Signals are linearly interpolated vs. time using interp1.

'Array6DoF'A double-precision array in n rows and 7 columns for 6-DoF data: time x y z 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 x z 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'.

Version History

Introduced in R2007a