Main Content

detect

Collect detections from all sensors in radar scenario

Description

detections = detect(scenario) reports the detections from all sensors mounted on every platform in the radar scenario, scenario. Use this syntax only when none of the sensors require information on the signals present in the scenario.

detections = detect(scenario,signals) reports the detections from all sensors when at least one sensor requires information on the signals present in the scenario.

detections = detect(scenario,signals,emitterConfigs) reports the detections from all sensors when at least one sensor also requires information on the emitter configurations in the scenario.

[detections,sensorConfigs] = detect(___) also returns the configurations of each sensor at the detection time. This output argument can be used with any of the previous syntaxes.

example

[___,sensorConfigPIDs] = detect(___) also returns all platform IDs corresponding to the sensor configurations, sensorConfigs. This output argument can be used with any of the previous syntaxes.

Examples

collapse all

Set the seed of the random number generator for reproducible results.

s = rng('default');

Create a radar scenario.

rs = radarScenario('UpdateRate',1);

Create the first platform and mount one emitter and one sensor on it.

plat1 = platform(rs);
plat1.Trajectory.Position = [0,0,0];
emitter1 = radarEmitter(1,'UpdateRate',1);
sensor1 = radarSensor(1,'DetectionMode','Monostatic','EmitterIndex',1,'RangeResolution',1);
plat1.Emitters = emitter1;
plat1.Sensors = sensor1;

Create the second platform and mount one emitter and one sensor on it.

plat2 = platform(rs);
plat2.Trajectory.Position = [100,0,0];
emitter2 = radarEmitter(2,'UpdateRate',1);
sensor2 = radarSensor(2,'DetectionMode','Monostatic','EmitterIndex',2,'RangeResolution',1);
plat2.Emitters = emitter2;
plat2.Sensors = sensor2;

Advance the radar scenario by one time step.

advance(rs);

Transmit and propagate the emissions.

[emtx,emitterConfs,emitterConfPIDs] = emit(rs);
emprop = propagate(rs,emtx,'HasOcclusion',true);

Collect the signals.

[dets,sensorConfs,sensorConfPIDs] = detect(rs,emprop,emitterConfs);

Display the detection results. The sensor on platform 1 detects the second platform.

detection = dets{1}
detection = 
  objectDetection with properties:

                     Time: 0
              Measurement: [3x1 double]
         MeasurementNoise: [3x3 double]
              SensorIndex: 1
            ObjectClassID: 0
    MeasurementParameters: [1x1 struct]
         ObjectAttributes: {[1x1 struct]}

detectedPlatform = detection.ObjectAttributes{1}
detectedPlatform = struct with fields:
     TargetIndex: 2
    EmitterIndex: 1
             SNR: 82.0123

Return the random number generator to its previous state.

rng(s)

Input Arguments

collapse all

Radar scenario, specified as a radarScenario object.

Signal emissions, specified as a cell array of signal emission objects, such as radarEmission objects.

Emitter configurations, specified as an array of emitter configuration structures. Each structure contains these fields.

FieldDescription
EmitterIndex

Unique emitter index, returned as a positive integer.

IsValidTime

Valid emission time, returned as 0 or 1. IsValidTime is 0 when emitter updates are requested at times that are between update intervals specified by the UpdateInterval property.

IsScanDone

Whether the emitter has completed a scan, returned as true or false.

FieldOfView

Field of view of the emitter, returned as a two-element vector [azimuth; elevation] in degrees.

MeasurementParameters

Emitter measurement parameters, returned as an array of structures containing the coordinate frame transforms needed to transform positions and velocities in the top-level frame to the current emitter frame.

Output Arguments

collapse all

Detections, returned as a cell array of objectDetection objects.

Sensor configurations, returned as an array of sensor configuration structures. Each structure contains these fields.

FieldDescription
SensorIndex

Unique sensor index, returned as a positive integer.

IsValidTime

Valid detection time, returned as true or false. IsValidTime is false when detection updates are requested between update intervals specified by the update rate.

IsScanDone

IsScanDone is true when the sensor has completed a scan.

FieldOfView

Field of view of the sensor, returned as a 2-by-1 vector of positive real values, [azfov;elfov]. azfov and elfov represent the field of view in azimuth and elevation, respectively.

MeasurementParameters

Sensor measurement parameters, returned as an array of structures containing the coordinate frame transforms needed to transform positions and velocities in the top-level frame to the current sensor frame.

Platform IDs for sensor configurations in the sensorConfigs output argument, returned as an array of positive integers.

Introduced in R2021a