Main Content

plotCoverage

Plot sensor coverage in trackingGlobeViewer

Description

plotCoverage(viewer,configs) plots the sensor coverages specified by the array of coverage configuration structures configs.

Note

When the CoverageMode property of the viewer is set to "Beam", the function plots only the sensor or emitter beam. When the CoverageMode property is set to "Coverage", the function plots both the beam and coverage of the sensor.

plotCoverage(___,frame) specifies the reference frame used to interpret the Position field of the coverage configuration structures, in addition to the input arguments from the previous syntax..

example

plotCoverage(___,Name=Value) specifies options using one or more name-value arguments. For example, plotCoverage(viewer,configs,Color=[1 0 0]) specifies the color of the plotted coverages as the RGB triplet [1 0 0].

Examples

collapse all

Create a tracking scenario, add a platform in the scenario, and mount a radar sensor on the platform.

scene = trackingScenario(IsEarthCentered=true);
r = fusionRadarSensor(1,RangeLimits=[0 5e6]);
radarTowerLLA = [10 10 1000];
platform(scene,'Position',radarTowerLLA,'Sensors',r);

Use the coverageConfig function to obtain the coverage configuration of the radar sensor.

covcon = coverageConfig(scene);

Create a tracking globe viewer and plot the coverage.

viewer = trackingGlobeViewer;
plotCoverage(viewer,covcon,"ECEF",Color=[1 0 0])

Take a snapshot and show the results.

drawnow
snapshot(viewer)

Input Arguments

collapse all

Tracking globe viewer, specified as a trackingGlobeViewer object.1

Coverage configurations, specified as an array of coverage configuration structures. Each structure contains these fields:

Fields of configurations

FieldDescription
Index A unique integer to identify sensors or emitters.
LookAngle

Current boresight angles of the sensor or emitter, specified as:

  • A scalar in degrees if scanning only in the azimuth direction.

  • A two-element vector [azimuth; elevation] in degrees if scanning in both the azimuth and elevation directions.

FieldOfViewField of view of the sensor or emitter, specified as a two-element vector [azimuth; elevation] in degrees.
ScanLimits

Minimum and maximum angles the sensor or emitter can scan from its Orientation.

  • If the sensor or emitter can only scan in the azimuth direction, specify the limits as a 1-by-2 row vector [minAz, maxAz] in degrees.

  • If the sensor or emitter can also scan in the elevation direction, specify the limits as a 2-by-2 matrix [minAz, maxAz; minEl, maxEl] in degrees.

RangeRange of the beam and coverage area of the sensor or emitter in meters.
PositionOrigin position of the sensor or emitter, specified as a three-element vector [X, Y, Z].
OrientationRotation transformation from the scenario or global frame to the sensor or emitter mounting frame, specified as a rotation matrix, a quaternion, or three Euler angles in ZYX sequence.

Note

Specify the Index field as a positive integer if the input is a sensor object, such as a fusionRadarSensor object. Specify the Index field as a negative integer if the input is an emitter object, such as a radarEmitter object.

Reference frame, specified as "NED" for north-east down, "ENU" for east-north-up, or "ECEF" for Earth-centered-Earth-fixed. When specified as "NED" or "ENU", the origin of the reference frame is at the location specified by the ReferenceLocation property of the viewer object.

Data Types: char | string

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: plotCoverage(viewer,configs,Color=[1 0 0])

Color of sensor coverages, specified as an N-by-3 matrix of RGB triplets, where N is the number of sensor coverages specified in the configs input.

Coverage transparency, specified as a scalar in range [0, 1].

Version History

Introduced in R2021b

1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.