phased.Platform
Model platform motion
Description
The phased.Platform
System object™ models the translational motion of one or more platforms in space. A platform
can be a target such as a vehicle or airplane, or a sonar or radar transmitter and receiver.
The model assumes that the platform undergoes translational motion at constant velocity or
constant acceleration during each simulation step. Positions and velocities are always defined
in the global coordinate system.
To model a moving platform:
Create the
phased.Platform
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Syntax
Description
sPlat = phased.Platform
creates a platform System object, sPlat
, with default property values. The object models
a stationary platform with position at the origin and velocity set to zero.
sPlat = phased.Platform(
creates an object, Name
,Value
)sPlat
, with each specified property Name set to
the specified Value. You can specify additional name-value pair arguments in any order as
(Name1
,Value1
,...,NameN
,ValueN
).
sPlat = phased.Platform(
creates a platform object, pos
,vel
,Name
,Value
)sPlat
, with
InitialPosition
set to pos
and
Velocity
set to vel
. Other specified property
Names are set to specified Values. The pos
and
vel
arguments are value-only. Value-only arguments do not require a
specified Name but are interpreted according to their argument positions. To specify any
value-only argument, specify all preceding value-only arguments.
Properties
Usage
To model a moving platform, call the object with arguments, as if it were a function (described here).
Description
[Pos,Vel] = sPlat(T)
returns the current position,
Pos
, and velocity, Vel
, of the platform. The
method then updates the position and velocity. When the MotionModel
property is set to 'Velocity'
and the
VelocitySource
property is set to 'Property'
,
the position is updated using the equation Pos = Pos + Vel*T where T specifies the elapsed time (in seconds) for
the current step. When the MotionModel
property is set to
'Acceleration'
and the AccelerationSource
property is set to 'Property'
, the position and velocity are updated
using the equations Pos = Pos + Vel*T + 1/2Acl*T^2 and Vel = Vel + Acl*T where T specifies the elapsed time (in seconds) for
the current step.
[Pos,Vel] = sPlat(T,V)
returns the current position,
Pos
, and the current velocity, Vel
, of the
platform. The method then updates the position and velocity using the equation Pos = Pos + Vel*T where T specifies the elapsed time (in seconds) for
the current step. This syntax applies when you set the MotionModel
property to 'Velocity'
and the VelocitySource
property to 'Input port'
.
[Pos,Vel] = sPlat(T,A)
returns the current position,
Pos
, and the current velocity, Vel
, of the
platform. The method then updates the position and velocity using the equations Pos = Pos + Vel*T + 1/2Acl*T^2 and Vel = Vel + Acl*T where T
specifies the elapsed time (in seconds) for the current step. This syntax applies when you
set the MotionModel
property to 'Acceleration'
and
the AccelerationSource
property to 'Input
port'
.
[Pos,Vel,Laxes] = sPlat(___)
returns the additional
output Laxes
as the platform's orientation axes when you set the
OrientationAxesOutputPort
property to
true
.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
More About
Extended Capabilities
Version History
Introduced in R2011a