Transform emissions to body frame of platform


embody = emissionsInBody(emscene,bodyframe) converts emissions, emscene, referenced to scenario coordinates into emissions, embody, referenced to platform body coordinates. bodyframe specifies the position,velocity, and orientation of the platform body.


collapse all

Convert a radar emission from scenario coordinates to body frame.

Define a radar emission with respect to the scenario frame.

emScene = radarEmission('PlatformID',1,'EmitterIndex',1, ...
    'OriginPosition',[0 0 0])

Define the position, velocity, and orientation, of the body relative to the scenario frame.

bodyFrame = struct( ...
    'Position',[10 0 0], ...
    'Velocity',[5 5 0], ...
    'Orientation',quaternion([45 0 0],'eulerd','zyx','frame'));

Convert the emission into the body frame.

emBody = emissionsInBody(emScene,bodyFrame)

Convert a sonar emission from scenario coordinates into body coordinates. Use trackingScenario to defined the motion of the body and use sonarEmitter to create the emission.

Set up a tracking scenario.

scene = trackingScenario;

Create a sonar emitter to mount on a platform.

emitter = sonarEmitter(1,'No scanning');

Mount the emitter on a platform in the scenario 100 meters below sea-level.

platTx = platform(scene,'Emitters',emitter);
platTx.Trajectory.Position = [10 0 100];

Create another platform in the scenario.

platRx = platform(scene);
platRx.Trajectory.Position = [100 0 100];
platRx.Trajectory.Orientation = quaternion([45 0 0],'eulerd', ...

Emit a signal. The emitted signal is in the scenario frame.

emScene = emit(platTx,scene.SimulationTime)
emScene = 1x1 cell array
    {1x1 sonarEmission}

Propagate the emission through an underwater channel.

emPropScene = underwaterChannel(emScene,scene.Platforms)
emPropScene=2×1 cell array
    {1x1 sonarEmission}
    {1x1 sonarEmission}

Convert the emission to the body frame of the second platform.

emBodyRx = emissionsInBody(emPropScene, platRx);
    {1x1 sonarEmission}

Input Arguments

collapse all

Emissions in scenario coordinates, specified as a cell array of radarEmission or sonarEmission emission objects.

Body frame, specified as a structure or Platform object. You can use a Platform object because it contains the necessary information. The body frame structure must contain at least these fields:


Position of body in scenario coordinates, specified as a real-valued 1-by-3 vector. This field is required. There is no default value. Units are in meters.


Velocity of body in scenario coordinates, specified as a real-valued 1-by-3 vector. Units are in meters per second. The default is [0 0 0].


Orientation of body with respect to the scenario coordinate frame, specified as a scalar quaternion or a 3-by-3 rotation matrix. Orientation defines the frame rotation from the scenario coordinate system to the body coordinate system. Units are dimensionless. The default is quaternion(1,0,0,0) or, equivalently, eye(3).

Because the fields in the body frame structure are a subset of the fields in a platform structure, you can use the platform structure output from the platformPoses method of trackingScenario as the input bodyframe.

Output Arguments

collapse all

Emissions in body coordinates, returned as a cell array of radarEmission and sonarEmission emission objects.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2018b