📄 plazitim.m
字号:
function plazitim (eph,tsat,azim,elev,cutoff)%PLAZITIM: Plot azimuth vs time%% The function create a plot showing the azimuth of GPS satellites% as a function of time. Only satellites above the cutoff-angle are% displayed.%% Syntax:% plazitim (eph,tsat,azim,elev,cutoff);%% Input arguments:% eph - Ephemerides% tsat - Time (secs)% azim - Azimuth for each satellite% elev - Elevation for each satellite% cutoff - Cutoff elevation%% Output arguments:% none% ----------------------------------------------------------------------% File.....: pleletim.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','Azimuth vs. time', ... '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 ('Time [sec]');ylabel ('Azimuth (deg)');set (gca,'Xlim',[min(tsat) max(tsat)]);set (gca,'Ylim',[0 360]);plot ([min(tsat) max(tsat)],[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 (tsat(idx1(idx2(j)+1):idx1(idx2(j+1))), ... azim(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 = tsat(idx1(round(mean([idx2(j) idx2(j+1)])))); ty = azim(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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -