由地面两点计算是否通视

由高度角和发射机和接收机之间的角度进行比较,得出是否能够通视

function [isvis, canShowObstruction, obsLoc, obsEl] = computeLOSUsingTerrainProfile(observerSite, observerCoords, criticalAngle, lats, lons, map)

% Initialize outputs to correspond to no-obstruction case
isvis = true;
canShowObstruction = false;
obsLoc = [];
obsEl = [];

% Return early if not enough data points. Analysis requires at least three
% points: two end points and one middle point.
if numel(lats) <= 2
    return
end

% Compute visibility status by looking for first obstruction along terrain
% between observer and target, which is located where elevation angle from
% observer is greater than angle between observer and target. 通过查找沿地形的第一个障碍物来计算可见性状态在观察点和目标之间,该仰角大于观察点和目标之间的角度。
rxprofile = rxsite('Name', 'internal.terrainsamplesite', ... % Specify to avoid default site naming
    'AntennaHeight', 0, ...
    'Latitude', lats(2:end-1), ...
    'Longitude', lons(2:end-1));
[~, el] = angle(observerSite, rxprofile, 'euclidean', 'Map', map, ...
    'SourceAntennaSiteCoordinates', observerCoords);
obstructionInd = find(el >= criticalAngle, 1);
isvis = isempty(obstructionInd);

% If first sample is obstruction, assume there is complete obstruction
% (i.e. no point to show as visible)
canShowObstruction = obstructionInd ~= 1;

% Compute obstruction point
if ~isvis
    obstructingSite = rxprofile(obstructionInd);
    obstruction = rfprop.internal.AntennaSiteCoordinates.createFromAntennaSites(...
        obstructingSite, map);
    obsLoc = obstruction.DisplayLatitudeLongitude;
    obsEl = obstruction.SurfaceHeightAboveTerrainReference;
end
end
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值