⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cov_avail.m

📁 gps“可用性”matlab代码 Matlab Algorithm Availability Simulation Tool
💻 M
字号:
function cov_avail (usrdata, vpl, hpl, vhal, pa_mode)%*************************************************************************%*     Copyright c 2007 The board of trustees of the Leland Stanford     *%*                      Junior University. All rights reserved.          *%*     This script file may be distributed and used freely, provided     *%*     this copyright notice is always kept with it.                     *%*                                                                       *%*     Questions and comments should be directed to Todd Walter at:      *%*     twalter@stanford.edu                                              *%*************************************************************************%% create a coverage vs Availability plot for two sets of information%Modified Todd Walter June 28, 2007 to include VAL, HAL and PA vs. NPA mode%modified Todd Walter August 1, 2007 to include latitude weighting for%coverageglobal COL_USR_LL COL_USR_INBND;isinbnd = usrdata(:, COL_USR_INBND);cos_lats = cos(usrdata(:, COL_USR_LL(1))*pi/180);n_times = size(vpl, 2);coverage_set = [];%calculate availabilityif(pa_mode)    avail1=sum(((vpl <= vhal(1)) & (hpl <= vhal(2)))')'/n_times;    title_text = ['Coverage vs Availability (VAL = ' num2str(vhal(1)) ...                  ', HAL = ' num2str(vhal(2)) ')'];else    avail1=sum(((hpl <= vhal(2)))')'/n_times;    title_text = ['Coverage vs Availability (HAL = ' num2str(vhal(2)) ')'];   endpercent_ax = .95:.001:1;for percent = .95:.001:1        idx=find((avail1 >= percent) & isinbnd);    if(~isempty(idx))        coverage=sum(cos_lats(idx))/sum(isinbnd.*cos_lats);        coverage=fix(coverage*10000)/100;    else        coverage = 0;    end;        coverage_set = [coverage_set coverage];   endplot (percent_ax, coverage_set, 'LineWidth', 2);title(title_text, 'FontSize', 16);xlabel('Percent Availability', 'FontSize', 12);minc = min(coverage_set) - .05;minc = max(0, minc);minc = min(98, minc);axis([.95 1 minc 100])ylabel('Coverage', 'FontSize', 12);

⌨️ 快捷键说明

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