pltracks.m

来自「Sky lab calculate position of satellite 」· M 代码 · 共 84 行

M
84
字号
function pltracks (eph,tsat,xsat,ysat,zsat);%PLWORLD: Plot satellite tracks over the world%% The function create a plot showing the tracks of satellites over% the world.%% Syntax:%    plworld (eph,tsat,xsat,ysat,zsat);%% Input arguments:%    eph    - Ephemerides%    tsat   - Times on which positions are computed%    xsat   - X-coordinates in earth-fixed WGS'84 coordinates%    ysat   - Y-coordinates in earth-fixed WGS'84 coordinates%    zsat   - Z-coordinates in earth-fixed WGS'84 coordinates%% Output arguments:%    none% ----------------------------------------------------------------------% File.....: plworld.m% Date.....: 11-JUN-1999% Version..: 1.0% Author...: Peter Joosten%            Mathematical Geodesy and Positioning%            Delft University of Technology% ----------------------------------------------------------------------% -----------------------------------------------------% --- Coastlines, limits, grid, labels and such ... ---% -----------------------------------------------------set (gca,'Xlim',[-180 180]);set (gca,'Ylim',[-90 90]);load coast;h = plot (long,lat,'k-');
axis tighthold on% ------------------------------% --- Plot satellites tracks ---% ------------------------------%tnow = mktsat ( satpos, satpos, 300);
%idx2 = find(abs(tsat-tnow)==min(abs(tsat-tnow)));
T=length(tsat);
%M = moviein(T);
for t = 1 : T
%for i = 1:size(eph,1);    plh = xyz2plh ([xsat(:,t) ysat(:,t) zsat(:,t)]);  %idx = [0 find(abs(plh(2,1:size(plh,2)-1)-plh(2,2:size(plh,2)))>deg2rad(180)) size(plh,2)];    %for j = 1:length(idx)-1;    %h = plot (rad2deg(plh(2,idx(j)+1:idx(j+1))),rad2deg(plh(1,idx(j)+1:idx(j+1))));    %set (h,'Marker','+');    %set (h,'LineWidth',0.5);    %set (h,'Color','b')
  %end;  
    h = plot (rad2deg(plh(:,2)),rad2deg(plh(:,1)),'b.');    %set (h,'Marker','.');    %set (h,'LineWidth',1);    %set (h,'Color','r');
 %  [tx,ty] = pol2cart (deg2rad(-azim(i,idx1(idx2(j)+1))+90),90-elev(i,idx1(idx2(j)+1)));%  tx = tx - 2; ty = ty + 2;%  h  = text(tx,ty,num2str(eph(i,1)));%  set (h,'Color',lcol(mod(i,size(lcol,1))+1,:));      %end
%M(t)=getframe;
pause(1)
end%movie(M)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?