📄 elevaz.m
字号:
% elevaz.m
% Scope: This MATLAB macro computes the elevation angle, the azimuth angle,
% ECEF unit line-of-sight vector and the range, when the ECEF user
% and satellite positions are known; WGS-84 constants are used.
% Usage: [eangle,az,ulos,range] = elevaz(user,sv)
% Description of parameters:
% user - input, ECEF user position vector
% sv - input, ECEF satellite position vector
% eangle - output, elevation angle in radians
% az - output, azimuth angle in radians
% ulos - output, ECEF unit line-of-sight vector
% range - output, range from user to satellite
% Remark: The components of the input vectors and the range should have the
% same unit, e.g. meter, foot.
% External Matlab macros used: tecefgd, vecefenu, wgs84con
% Last update: 06/07/99
% Copyright (C) 1996-99 by LL Consulting. All Rights Reserved.
function [eangle,az,ulos,range] = elevaz(user,sv)
temp = sv - user;
range = sqrt(temp' * temp); % range
ulos = temp / range; % ECEF unit line-of-sight
[ulat,ulon,ualt] = tecefgd(user); % user's geodetic coordinates
ulosenu = vecefenu(ulos,ulat,ulon); % ENU unit line-of-sight
eangle = asin(ulosenu(3)); % elevation angle
az = atan2(ulosenu(1),ulosenu(2)); % azimuth angle
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -