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.


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
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 the following table. The default value is 'Array6DoF'. Character vector
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:


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.

'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.
'Custom'Position and angle data is retrieved from 'TimeseriesSource' by the currently registered 'TimeseriesReadFcn'.

Introduced in R2007a

Was this topic helpful?