occlusion
Description
Examples
Query Occlusion Status of Ground Surface in trackingScenario
Create a tracking scenario object.
scene = trackingScenario;
Specify the terrain and define the boundary of the terrain as a square centered at the origin.
terrrain =[0 10 0; 0 10 0; 0 10 0]; boundary = [-100 100; -100 100];
Create the ground surface and add it to the scenario.
surface = groundSurface(scene,Terrain=terrrain,Boundary=boundary)
surface = GroundSurface with properties: Terrain: [3x3 double] ReferenceHeight: 0 Boundary: [2x2 double]
Query the occlusion status of the line-of-sight vector between the corner point (–100, –100, 0) and the other corner point (100, 100, 20). The ground surface occludes the line-of-sight.
occlusion(surface,[-100 -100 0],[100 100 20])
ans = logical
0
Raise the height of the first corner point. Now the ground surface no longer occludes the line-of-sight.
occlusion(surface,[-100 -100 10],[100 100 20])
ans = logical
0
Input Arguments
surface
— Ground surface
GroundSurface
object
Ground surface, specified as a GroundSurface
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.
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 (한국어)