📄 distance.m
字号:
function dis = distance(lon,lat)
% this function returns the distance from certain position to satllite
% the satellite(SINOSAT-2) is above point of intersection of 92.2°E and
% the equator, orbit radius is 42164.6km, earth radius is 6378km.
% lon,lat: longitude and latitude of the earth station
Re = 6378.14; % earth radius, km.
R = 42164.57; % orbit radius, km.
lon0 = 92.2; % longitude of the satellite
lat0 = 0; % latitude of the satellite
dlon = (lon-lon0)*pi/180; % delta longitude between satellite and earth sation
dlat = (lat-lat0)*pi/180; % delta latitude between satellite and earth sation
dis = R*sqrt(1+(Re/R)^2-2*Re*cos(dlon)*cos(dlat)/R);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -