play
Class: Aero.Animation
Namespace: Aero
Animate Aero.Animation
object given position/angle time
series
Syntax
play(h)
Description
play(
animates the loaded geometry in the
animation object h
)h
for the current
TimeseriesDataSource
at the specified rate given by the
Aero.Animation
'TimeScaling'
property in seconds of animation data per second of
wall-clock time. The animation is created at a certain number of frames per second using the
'FramesPerSecond'
property. For more information on how the method uses
timeseries data, see Algorithms.
Input Arguments
Examples
Algorithms
The Aero.Animation.play
interprets its time series data according to the
Aero.Body
'TimeSeriesSourceType'
property, which can be one of these values.
'Timeseries' | MATLAB® time series data with six values per time:
x, y, and z are Cartesian position coordinates. phi, theta, and psi are roll, pitch, and yaw angles. The values are resampled. |
'Simulink.Timeseries' | Simulink.Timeseries (Simulink® signal logging):
|
'StructureWithTime' | Simulink struct with time, for example, Simulink root outport logging
Signals are linearly interpolated vs. time using the
|
'Array6DoF' | A double-precision array in n rows and seven columns for 6DOF
data: time x y z phi theta psi . If a double-precision array of
eight or more columns is in 'TimeSeriesSource' , the first seven
columns are used as 6DOF data. |
'Array3DoF' | A double-precision array in n rows and four columns for 3DOF
data: time x z theta . If a double-precision array of five or more
columns is in 'TimeSeriesSource' , the first four columns are used
as 3DOF data. |
'Custom' | Position and angle data is retrieved from 'TimeSeriesSource'
by the currently registered 'TimeseriesReadFcn' . |
The TStart
and TFinal
values have these
limitations:
TStart
andTFinal
must be numeric.TStart
andTFinal
cannot beInf
orNaN
.TFinal
must be greater than or equal toTStart
.TFinal
cannot be greater than the maximumTimeseries
time.TStart
cannot be less than the minimumTimeseries
time.
The Aero.Animation.play
method uses a time advancement algorithm based on
animation frames counted by ticks:
ticks = ticks + 1; time = tstart + ticks*FramesPerSecond*TimeScaling;
where
TimeScaling | Specifies the seconds of animation data per second of wall-clock time. |
FramesPerSecond | Specifies the number of frames per second used to animate the
'TimeSeriesSource' . |
For default 'TimeseriesReadFcn'
methods, the last frame played is the
last time value.
Time is in seconds. Position values are in the same units as the geometry data loaded into the animation object. All angles are in radians.
Note
If there is a 15% difference between the expected time advance and the actual time advance, this method generates this warning:
TimerPeriod has been set to <value>. You may wish to modify the animation TimeScaling and FramesPerSecond properties to compensate for the millisecond limit of the TimerPeriod. See documentation for details.
Version History
Introduced in R2007a