📄 plvissat.m
字号:
function plvissat (eph,tsat,elev,cutoff)%PLVISSAT: Plot visible satellites%% The function create a plot showing which satellites are visible% at a certain time%% Syntax:% plvissat (eph,tsat,elev,cutoff)%% Input arguments:% eph - Ephemerides% tsat - Time (secs)% elev - elevation for each satellite% cutoff - Cutoff elevation%% Output arguments:% none% ----------------------------------------------------------------------% File.....: plvissat.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','Visible satellites 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','off', ... 'Box','on');hold on;% -----------------------------------------% --- Limits, grid, labels and such ... ---% -----------------------------------------xlabel ('Time [sec]');ylabel ('Satellite (PRN)');set (gca,'Xlim',[min(tsat) max(tsat)]);set (gca,'Ylim',[0 size(eph,1)+1]);set (gca,'ytick',[0:1:size(eph,1)+1]);ylab = char(32*ones(size(eph,1)+2,2));for i = 1:size(eph,1); ylab(i+1,:) = sprintf('%2i',eph(i,1));end;set (gca,'YTickLabel',ylab);% -------------------% --- 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)]; for j = 1:length(idx2)-1 h = plot (tsat(idx1(idx2(j)+1):idx1(idx2(j+1))), ... i*ones(size(tsat(idx1(idx2(j)+1):idx1(idx2(j+1)))))); set (h,'LineStyle','-'); set (h,'LineWidth',5); set (h,'Color',lcol(mod(i,size(lcol,1))+1,:)); % tx = tsat(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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -