Main Content

detect

Collect detections from all the sensors in tracking scenario

Since R2020a

Description

detections = detect(sc) reports the detections from all sensors mounted on every platform in the tracking scenario, sc.

Note

If the HasOcclusion property of the SurfaceManager object, contained in the SurfaceManager property of the tracking scenario, is specified as true, then the detect function accounts for occlusion due to scenario surfaces. If it is specified as false, the detect function does not model occlusion due to ground surfaces and the horizon modeled by the WGS84 Earth model.

Tip

Use this syntax only when none of the sensors requires knowledge of the signals present in the scenario. For example, the HasInterference property of fusionRadarSensor is set to false.

detections = detect(sc,signals) reports the detections from all sensors when at least one sensor requires the knowledge of signals in the scenario. For example, when a fusionRadarSensor is operating in an ESM mode.

detections = detect(sc,signals,configs) reports the detections from all sensors when at least one sensor also requires the knowledge of emitter configurations in the scenario. For example, when a radarSensor is configured as a monostatic radar.

[detections,sensorConfigs] = detect(___) additionally returns the configurations of each sensor at the detection time.

[detections,sensorConfigs,configIDS] = detect(___) additionally returns all platform IDs corresponding to the sensor configurations, sensorConfigs.

example

Examples

collapse all

Create a tracking scenario.

s = rng(0); % For repeatable result
ts = trackingScenario('UpdateRate',1);

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

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

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

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

Advance the tracking scenario, transmit and propagate emissions, and collect signals using the detect function.

advance(ts);
[emtx,emitterConfs,emitterConfPIDs] = emit(ts); % Transmitted emissions
emprop = propagate(ts,emtx,'HasOcclusion',true); % Propagate emissions
[dets,sensorConfs,sensorConfPIDs] = detect(ts,emprop,emitterConfs);

Display the detection results: Sensor 1 on platform 1 detected platform 2.

disp(dets{1})
  objectDetection with properties:

                     Time: 0
              Measurement: [3x1 double]
         MeasurementNoise: [3x3 double]
              SensorIndex: 1
            ObjectClassID: 0
    ObjectClassParameters: []
    MeasurementParameters: [1x1 struct]
         ObjectAttributes: {[1x1 struct]}
sensor = dets{1}.SensorIndex
sensor = 
1
detectedPlatform = dets{1}.ObjectAttributes{1}.TargetIndex
detectedPlatform = 
2
rng(s) % Return the random number generator to its previous state

Input Arguments

collapse all

Tracking scenario, specified as a trackingScenario object.

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

Emitter configurations, specified as an array of emitter configuration structures. The fields of each structure are:

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 looking-angle frame.

Output Arguments

collapse all

Detections, returned as a cell array of objectDetection objects.

Sensor configurations, return as an array of sensor configuration structures. The fields of each structure are:

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.

RangeLimitsLower and upper range detection limits, returned as a two-element real-valued vector in meters.
RangeRateLimitsLower and upper range-rate detection limits, returned as a two-element real-valued vector in m/s.
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 looking-angle frame.

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

Version History

Introduced in R2020a