esang.m
来自「卫星链路的计算」· M 代码 · 共 29 行
M
29 行
function [Ae,Aa] = ESAng(lon,lat)
% This function caculates the elevation and azimuth of earth station
% Ae: Earth station's elevation towards satellite
% Aa: Earth station's azimuth towards satellite
Re = 6378.14; % earth radius, km.
R = 42164.57; % orbit radius, km.
lon0 = 138; % longitude of the satellite
lat0 = 0; % latitude of the satellite
temp1 = cos(lat*pi/180)*cos((lon-lon0)*pi/180);
temp2 = (temp1-Re/R)/sqrt(1-temp1^2);
Ae = atan(temp2);
temp3 = tan((lon-lon0)*pi/180)/sin(lat*pi/180);
A = atan(temp3);
if lat>=0
if lat<lat0
Aa= pi-A;
else
Aa = pi+A;
end
else
if lat<lat0
Aa= A;
else
Aa = 2*pi-A;
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?