pleleazi.m

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

M
97
字号
function pleleazi (eph,azim,elev,cutoff)%PLELEAZI: Plot elevation as a function of azimuth%% The function create a plot showing the elevation as a function% of the azimuth%% Syntax:%    pleleazi (eph,azim,elev,cutoff);%% Input arguments:%    eph    - Ephemerides%    azim   - Azimuth of satellites%    elev   - Elevation for each satellite%    cutoff - Cutoff elevation%% Output arguments:%    none% ----------------------------------------------------------------------% File.....: pleleazi.m% Date.....: 29-APR-1999% Version..: 1.0% Author...: Peter Joosten%            Mathematical Geodesy and Positioning%            Delft University of Technology% ----------------------------------------------------------------------% --------------------------------------% --- Create the figure, set options ---% --------------------------------------h = figure('Units','normalized', ...	   'Position',[0.2 0.5 0.6 0.3], ...	   'Color',[0 0 0], ...	   'Name','Elevation vs. azimuth', ...	   'NumberTitle','off');h = axes ('Units','normalized', ...	  'Position',[0.05 0.10 0.90 0.80], ...	  'Color',[0 0 0], ...	  'XColor',[1 1 1], ...	  'YColor',[1 1 1], ...	  'Xgrid','on', ...	  'Ygrid','on', ...	  'Box','on');hold on;% -----------------------------------------% --- Limits, grid, labels and such ... ---% -----------------------------------------xlabel ('Azimuth [deg]');ylabel ('Elevation [deg]');set (gca,'Xlim',[0 360]);set (gca,'Ylim',[0  90]);plot ([0 360],[cutoff cutoff],'w:');% -------------------% --- Actual plot ---% -------------------lcol = get(gca,'ColorOrder');for i = 1:size(eph,1);  idx1 = find(elev(i,:)>cutoff);    if ~isempty(idx1);        idx2 = [0 (find (idx1(1:length(idx1)-1) ~= idx1(2:length(idx1))-1)) length(idx1)];    idx3 = find (abs(azim(i,idx1(1:length(idx1)-1))-(azim(i,idx1(2:length(idx1)))))>180);    if ~isempty(idx3); idx2 = sort ([idx2 idx3]); end;    for j = 1:length(idx2)-1      h = plot (azim(i,idx1(idx2(j)+1):idx1(idx2(j+1))), ...		elev(i,idx1(idx2(j)+1):idx1(idx2(j+1))));      set (h,'LineStyle','-');      set (h,'LineWidth',2);      set (h,'Color',lcol(mod(i,size(lcol,1))+1,:));            tx = azim(i,idx1(round(mean([idx2(j) idx2(j+1)]))));      ty = elev(i,idx1(round(mean([idx2(j) idx2(j+1)]))))+3;      h  = text(tx,ty,num2str(eph(i,1)));      set (h,'Color',lcol(mod(i,size(lcol,1))+1,:));          end;  end  end;% ----------------------% --- End of routine ---% ----------------------

⌨️ 快捷键说明

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