coveragePlotter
Description
creates a cPlotter
= coveragePlotter(tp
)CoveragePlotter
object for use with the theater plot object,
tp
. Use the plotCoverage
function to plot the sensor coverage via the created CoveragePlotter
object.
creates a cPlotter
= coveragePlotter(tp
,Name,Value
)CoveragePlotter
object with additional options specified by one
or more Name,Value
pair arguments.
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
tp
— Theater plot
theaterPlot
object
Theater plot, specified as a theaterPlot
object.
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.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'DisplayName', 'Radar1'
DisplayName
— Plot name to display in legend
character vector | string scalar
Plot name to display in legend, specified as the comma-separated pair consisting of 'DisplayName'
and a character vector or string scalar. If no name is specified, no entry is shown.
Example: 'DisplayName','Radar Detections'
Color
— Coverage area and sensor beam color
'auto'
(default) | character vector | string scalar | RGB triplet | hexadecimal color code
Coverage area and sensor beam color, specified as a character vector, a string
scalar, an RGB triplet, a hexadecimal color code, or 'auto'
. When a
color is specified, the plotter draws all coverage areas and beams with the specified
color. If the color is set to 'auto'
, the plotter uses the axis
color order to assign colors to sensors based on their sensor indices.
Alpha
— Face alpha values of coverage area and sensor beam
[0.7 0.05]
(default) | 2-element vector of nonnegative scalars
Face alpha values of the coverage area and the sensor beam, specified as a 2-element vector of nonnegative scalars. The first element is the value applied to the beam and the second element is the value applied to the coverage area.
Tag
— Tag associated with plotter
'PlotterN'
(default) | character vector | string
Tag associated with the plotter, specified as a character vector or string. You
can use the findPlotter
function to identify plotters based on their tag. The default value is
'PlotterN'
, where N is an
integer that corresponds to the Nth plotter associated with the
theaterPlot
.
Output Arguments
cPlotter
— Coverage plotter
CoveragePlotter
object
Coverage plotter, returned as a CoveragePlotter
object. You can
modify this object by changing its property values. The property names correspond to the
name-value pair arguments of the coveragePlotter
function.
To plot the coverage, use the plotCoverage
function.
Version History
Introduced in R2020a
See Also
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
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)