emissionsInBody

Transform emissions to body frame of platform

Syntax

embody = emissionsInBody(emscene,bodyframe)

Description

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.

Examples

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])
emScene = 

  radarEmission with properties:

                    EIRP: 0
                     RCS: 0
              PlatformID: 1
            EmitterIndex: 1
          OriginPosition: [0 0 0]
          OriginVelocity: [0 0 0]
             Orientation: [1×1 quaternion]
             FieldOfView: [180 180]
         CenterFrequency: 300000000
               Bandwidth: 3000000
            WaveformType: 0
          ProcessingGain: 0
        PropagationRange: 0
    PropagationRangeRate: 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)
emBody = 

  radarEmission with properties:

                    EIRP: 0
                     RCS: 0
              PlatformID: 1
            EmitterIndex: 1
          OriginPosition: [-7.0711 7.0711 0]
          OriginVelocity: [-7.0711 4.4409e-16 0]
             Orientation: [1×1 quaternion]
             FieldOfView: [180 180]
         CenterFrequency: 300000000
               Bandwidth: 3000000
            WaveformType: 0
          ProcessingGain: 0
        PropagationRange: 0
    PropagationRangeRate: 0

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', ...
    'zyx','frame');

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 =

  2x1 cell array

    {1x1 sonarEmission}
    {1x1 sonarEmission}

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

emBodyRx = emissionsInBody(emPropScene, platRx);
disp(emBodyRx(1))
    [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:

FieldDescription
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.

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