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.
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.
emscene — Emissions in scenario coordinates emission object
Emissions in scenario coordinates, specified as a cell array of radarEmission
or sonarEmission
emission objects.
bodyframe — Body frame structure | Platform object
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:
Field
Description
Position
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
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
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.