occlusion
Description
Examples
Query Occlusion Status Using Surface Manager
Create a tracking scenario.
scene = trackingScenario;
Create two ground surface terrains, each with a specified boundary.
terrain1 = magic(3)
terrain1 = 3×3
8 1 6
3 5 7
4 9 2
terrain2 = magic(4)
terrain2 = 4×4
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
boundary1 = [0 100; 0 100-eps]; boundary2 = [0 100; 100 200];
Add the two ground surfaces to the tracking scenario.
groundSurface(scene,Terrain=terrain1,Boundary=boundary1); groundSurface(scene,Terrain=terrain2,Boundary=boundary2);
Obtain the surface manager saved in the SurfaceManager
property of the tracking scenario.
manager = scene.SurfaceManager
manager = SurfaceManager with properties: UseOcclusion: 1 Surfaces: [1x2 fusion.scenario.GroundSurface]
Obtain the occlusion status for the line-of-sight vector between point (0,0,10) and (100,200,5). The ground surfaces occlude the line-of-sight.
[status,State] = occlusion(manager,[0 0 10]',[100 200 5]')
status = logical
1
State = SurfaceOcclusionState enumeration TerrainOccluded
Raise the second point to 15 meters and the line of sight becomes unoccluded.
[status,State] = occlusion(manager,[0 0 10]',[100 200 15]')
status = logical
0
State = SurfaceOcclusionState enumeration Unoccluded
Input Arguments
manager
— Surface manager
SurfaceManager
object
Surface manager, specified as a SurfaceManager
object.
p1
— Position of first point
three-element real-valued vector
Position of the first point, specified as a three-element real-valued vector.
If the IsEarthCentered
property of the trackingScenario
object is specified as:
false
— Specify the three elements, in meters, as the x-, y-, and z-coordinates of the position in the reference frame of the tracking scenario.true
— Specify the three elements as the latitude in degrees, longitude in degrees, and altitude in meters of the position, in the geodetic frame.
Data Types: single
| double
p2
— Position of second point
three-element real-valued vector
Position of the second point, specified as a three-element real-valued vector.
If the IsEarthCentered
property of the trackingScenario
object is specified as:
false
— Specify the three elements, in meters, as the x-, y-, and z-coordinates of the position in the reference frame of the tracking scenario.true
— Specify the three elements as the latitude in degrees, longitude in degrees, and altitude in meters of the position, in the geodetic frame.
Data Types: single
| double
Output Arguments
status
— Occlusion status
true
or 1
| false
or 0
Occlusion status, returned as a logical 1
(true
) or
0
(false
). If true, the line-of-sight between
the two positions is occluded by the surface. Otherwise, this argument returns
false.
state
— Occlusion state
"Unoccluded"
| "TerrrainOccluded"
| "HorizonOccluded"
Occlusion state, returned as:
"Unoccluded"
— The line of sight between the two points is not occluded."TerrainOcclude"
— The line of sight between the two points is occluded by ground surfaces."HorizonOcclude"
— The line of sight between the two points is occluded by the WGS84 Earth model. This option is only available when theIsEarthCentered
property of thetrackingScenario
is specified astrue
.
Data Types: char
| string
Version History
Introduced in R2022a
See Also
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 (한국어)