occlusion
Description
Examples
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: [1×2 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
Surface manager, specified as a SurfaceManager object.
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
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
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.
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 theIsEarthCenteredproperty of thetrackingScenariois 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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- 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)