plotCoverage
Description
plotCoverage(
specifies configurations of M sensors or emitters whose coverage areas
and beams are plotted by the cPlotter
,configurations
)CoveragePlotter
object,
cPlotter
. See coveragePlotter
on
how to create a CoveragePlotter
object.
plotCoverage(
specifies the color of each coverage and beam plot pair using a list of indices and
colors.cPlotter
,configurations
,indices
,colors
)
Examples
Plot Coverage in Theater Plot
Create a theater plot and set the limits for its axes. Create a coverage plotter with DisplayName
set to 'Sensor Coverage'
.
tp = theaterPlot('XLim',[-40 40],'YLim',[-40 40],'ZLim',[-40 40]); covp = coveragePlotter(tp,'DisplayName','Sensor Coverage');
Set up the configuration of the sensors whose coverage is to be plotted.
sensor = struct('Index',1,'ScanLimits',[-45 45],'FieldOfView',[10;40],... 'LookAngle',-10,'Range',30,'Position',zeros(1,3),'Orientation',zeros(1,3));
Plot the coverage using the plotCoverage
function and visualize the results. The dark blue represents the current sensor beam, and the light blue represents the coverage area.
plotCoverage(covp,sensor) view(70,30)
Animate Sensor Coverage Plot
Create a theater plot and create a coverage plotter.
tp = theaterPlot('XLim',[-1e7 1e7],'YLim',[-1e7 1e7],'ZLim',[-2e6 1e6]); covp = coveragePlotter(tp,'DisplayName','Sensor Coverage'); view(25,20)
Model a non-scanning radar and a raster scanning radar.
radarIndex = 1; radar =fusionRadarSensor(radarIndex,'No Scanning','RangeLimits',[0 1e8]); RasterIndex = 2; raster = fusionRadarSensor(RasterIndex,'Raster','RangeLimits',[0 1e8]);
Create a target platform.
tgt = struct( ... 'PlatformID', 1, ... 'Position', [0 -50e3 -1e3], ... 'Speed', -1e3);
Simulate sensors and visualize their scanning pattern.
time = 0; timestep = 1; stopTime = 90; while time < stopTime time = time+timestep; radar(tgt,time); raster(tgt,time); % Obtain sensor configuration using coverageConfig. radarcov = coverageConfig(radar); ircov = coverageConfig(raster); % Update plotter plotCoverage(covp,[radarcov,ircov],... [radarIndex, RasterIndex],... {'blue','red'}... ); pause(0.03) end
Input Arguments
cPlotter
— Coverage plotter object
CoveragePloter
object
Coverage plotter object, created by the coveragePlotter
function.
configurations
— Sensor or emitter configurations
array of structures
Sensor or emitter configurations, specified as an array of structures. Each structure corresponds to the configuration of a sensor or emitter. The fields of each structure are:
Fields of configurations
Field | Description |
---|---|
Index | A unique integer to distinguish sensors or emitters. |
LookAngle | The current boresight angles of the sensor or emitter, specified as:
|
FieldOfView | The field of view of the sensor or emitter, specified as a two-element
vector [azimuth ; elevation ] in
degrees. |
ScanLimits | The minimum and maximum angles the sensor or emitter can scan from
its
|
Range | The range of the beam and coverage area of the sensor or emitter in meters. |
Position | The origin position of the sensor or emitter, specified as a
three-element vector [X , Y ,
Z ] on the theater plot's axes. |
Orientation | The rotation 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. |
Tip
If either the value of Position
field or the value of the
Orientation
field is NaN
, the corresponding
coverage area and beam will not be plotted.
indices
— Sensor or emitter indices
N-element array of nonnegative integers
Sensor or emitter indices, specified as an N-element array of nonnegative integers. This argument allows you to specify the color of each coverage area and beam pair with the corresponding index.
Example: [1;2;4]
colors
— Coverage plotter colors
N-element array of character vector | N-element array of string scalar | N-element array of RGB triplet | N-element array of hexadecimal color code
Coverage plotter colors, specified as an N-element vector of
character vectors, string scalars, RGB triplets, or hexadecimal color codes.
N is the number of elements in the indices
array. The coverage area and beam pair indexed by the ith element in
the indices
array is plotted with the color specified by the
ith element of the colors
array.
Version History
Introduced in R2020a
See Also
coveragePlotter
| theaterPlot
| clearData
| clearPlotterData
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)