platform

Add platform to tracking scenario

Syntax

ptfm = platform(sc)
ptfm = platform(sc,Name,Value)

Description

ptfm = platform(sc) adds a Platform object, ptfm, to the tracking scenario, sc. The function creates a platform with default property values. Platforms are defined as points or cuboids with aspect-dependent properties. Each platform is automatically assigned a unique ID specified in the platformID field of the Platform object.

ptfm = platform(sc,Name,Value) adds a platform with additional properties specified by one or more Name,Value pair arguments. Name is a property name and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,...,NameN,ValueN. Any unspecified properties take default values.

Input Arguments

expand all

Tracking scenario, specified as a trackingScenario object.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Platform classification identifier specified as a nonnegative integer. You can define your own platform classification scheme and assign ClassID values to platforms according to the scheme. The value of 0 is reserved for an object of unknown or unassigned class.

Example: 5

Data Types: double

Platform dimensions and origin offset, specified as a structure. The structure contains the Length, Width, Height, and OriginOffset of a cuboid that approximates the dimensions of the platform. The OriginOffset is the position vector from the center of the cuboid to the origin of the platform coordinate frame. The OriginOffset is expressed in the platform coordinate system. For example, if the platform origin is at the center of the cuboid rear face as shown in the following figure, then set OriginOffset as [-L/2, 0, 0]. The default value for Dimensions is a structure with all fields set to zero, which corresponds to a point model.

Fields of Dimensions

FieldsDescriptionDefault
LengthDimension of a cuboid along the x direction0
WidthDimension of a cuboid along the y direction0
HeightDimension of a cuboid along the z direction0
OriginOffsetPosition of the platform coordinate frame origin with respect to the cuboid center[0 0 0 ]

Example: struct('Length',5,'Width',2.5,'Height',3.5,'OriginOffset',[-2.5 0 0])

Data Types: struct

Platform motion, specified as either a kinematicTrajectory object or a waypointTrajectory object.

The motion defines the time evolution of the position and velocity of the platform frame origin, as well as the orientation of the platform frame relative to the scenario frame.

Platform signatures, specified as a cell array of rcsSignature, irSignature, or tsSignature objects. A signature represents the reflection or emission pattern of a platform, such as its radar cross-section, target strength, or IR emission.

A pose estimator, specified as a pose estimator object. The pose estimator determines platform pose with respect to the local NED scenario coordinate. The interface of any pose estimator must match the interface of insSensor. By default, pose estimator accuracy properties are set to zero.

Emitters mounted on the platform, specified as a cell array of emitter objects, such as radarEmitter or sonarEmitter.

Sensors mounted on platform, specified as a cell array of sensor objects such as irSensor, radarSensor, monostaticRadarSensor, or sonarSensor.

Output Arguments

expand all

Scenario platform, returned as a Platform object.

Object Functions

detectDetect signals using platform-mounted sensors
emitRadiate signals from emitters mounted on platform
posePose of platform
targetPosesTarget positions and orientations as seen from platform

Examples

expand all

Create a tracking scenario and a platform following a circular path.

scene = trackingScenario('UpdateRate',1/50);

% Create a platform
plat = platform(scene);

% Follow a circular trajectory 1 km in radius completing in 400 hundred seconds.
plat.Trajectory = waypointTrajectory('Waypoints', [0 1000 0; 1000 0 0; 0 -1000 0; -1000 0 0; 0 1 0], ...
    'TimeOfArrival', [0; 100; 200; 300; 400]);

% Perform the simulation
while scene.advance
    p = pose(plat);
    fprintf('Time = %f ', scene.SimulationTime);
    fprintf('Position = [');
    fprintf('%f ', p.Position);
    fprintf('] Velocity = [');
    fprintf('%f ', p.Velocity);
    fprintf(']\n');
end
Time = 50.000000 Position = [623.561925 626.638509 0.000000 ] Velocity = [11.378941 -9.434245 0.000000 ]
Time = 100.000000 Position = [1000.000000 0.000000 0.000000 ] Velocity = [1.677836 -15.100595 0.000000 ]
Time = 150.000000 Position = [724.510494 -677.241693 0.000000 ] Velocity = [-11.268303 -10.477873 0.000000 ]
Time = 200.000000 Position = [0.000000 -1000.000000 0.000000 ] Velocity = [-16.843065 -2.681970 0.000000 ]
Time = 250.000000 Position = [-926.594496 -797.673675 0.000000 ] Velocity = [-15.117346 13.826681 0.000000 ]
Time = 300.000000 Position = [-1000.000000 0.000000 0.000000 ] Velocity = [9.520786 9.672548 0.000000 ]
Time = 350.000000 Position = [-421.669352 137.708709 0.000000 ] Velocity = [10.727588 -1.999781 0.000000 ]
Time = 400.000000 Position = [-0.000000 1.000000 0.000000 ] Velocity = [6.118648 -2.380995 0.000000 ]

Create a tracking scenario with two cuboid platforms following circular trajectories.

sc = trackingScenario;

% Create the platform for a truck with dimension 5 x 2.5 x 3.5 (m). 
p1 = platform(sc);
p1.Dimensions = struct('Length',5,'Width',2.5,'Height',3.5,'OriginOffset',[0 0 0]);

% Specify the truck's trajectory as a circle with radius 20 meters.
p1.Trajectory = waypointTrajectory('Waypoints', [20*cos(2*pi*(0:10)'/10)...
                              20*sin(2*pi*(0:10)'/10) -1.75*ones(11,1)], ...
                              'TimeOfArrival', linspace(0,50,11)');
                    
% Create the platform for a small quadcopter with dimension .3 x .3 x .1 (m).
p2 = platform(sc);
p2.Dimensions = struct('Length',.3,'Width',.3,'Height',.1,'OriginOffset',[0 0 0]);

% The quadcopter follows the truck at 10 meteres above with small angular delay.
% Note that the negative z coordinates correspond to positive elevation.
p2.Trajectory = waypointTrajectory('Waypoints', [20*cos(2*pi*((0:10)'-.6)/10)...
                               20*sin(2*pi*((0:10)'-.6)/10) -11.80*ones(11,1)], ...
                               'TimeOfArrival', linspace(0,50,11)');

Visualize the results using theaterPlot.

tp = theaterPlot('XLim',[-30 30],'YLim',[-30 30],'Zlim',[-12 5]);
pp1 = platformPlotter(tp,'DisplayName','truck','Marker','s');
pp2 = platformPlotter(tp,'DisplayName','quadcopter','Marker','o');

% Specify a view direction and animate.
view(-28,37);
set(gca,'Zdir','reverse');

while advance(sc)
    poses = platformPoses(sc);
    plotPlatform(pp1, poses(1).Position, p1.Dimensions, poses(1).Orientation);
    plotPlatform(pp2, poses(2).Position, p2.Dimensions, poses(2).Orientation);
end

See Also

Objects

System Objects

Introduced in R2018b