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

📄 xswdop.m

📁 GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角度变换; 3、坐标系转换: &#61656 点变换; &#61656 矩阵变换; &#61656 向量变换
💻 M
字号:
%                             xswdop.m
%  Scope:   This MATLAB program computes sub-weighted dilution of precision 
%           (sub-WDOP) quantities, i.e. WDOP quantities for all satellite 
%           subsets obtained by eliminating one satellite from the original 
%           set.
%  Usage:   xswdop
%  Inputs:  - name of the output file containing the results; the default is on
%             screen
%           - name of the input file containing line-of-sight unit vectors;
%             each row contains a line-of-sight (LOS) unit vector
%           - weighting factors (from keyboard) for each LOS
%  Outputs: - input/output data stored on the selected output file or
%             displayed on screen
%  Remark:  Five or more satellites are needed for the computation of sub-WDOP.
%           The sub-WHDOP is useful in the RAIM detection process [1], [2].
%  References: 
%           [1] Brown, A. K., Sturza, M. A., The effect of geometry on 
%               integrity monitoring performance. The Institute of Navigation
%               46th Annual Meeting, June 1990, pp. 121-129. 	
%           [2] Brown, R. G., A baseline RAIM scheme and a note on the
%               equivalence of three RAIM methods. Proceedings of the National
%               Technical Meeting, Institute of Navigation, San Diego, CA,
%               Jan. 27-29, 1992, pp. 127-137.
%  External Matlab macros used:  swdop
%  Last update:  08/05/00
%  Copyright (C) 1997-00  by LL Consulting. All Rights Reserved.

clear  
yes = 'y';

%  Save the generated data into a specified file if desired

disp('  ');
answer1 = input('Do you want to save the generated data? (y/n)[n] ','s');
if  isempty(answer1)
   answer1 = 'n';
end
if strcmp(answer1,yes) == 1
   disp('  ');
   f2 = input('Specify the output file name (with extension) --> ','s');
   else
   f2 = 1;        %  output to the screen
end
     
answer2 = yes;
disp('  ');
while (strcmp(answer2,yes) == 1)
   clear  f1 g1 tt wf 
   f1 = input('Specify the input filename (with extension) --> ','s');
   disp('  ');

%  Read the input data file

   tt = load(f1);
   [nrow,ncol] = size(tt);

   if  (ncol ~= 3) | (nrow < 5)
      disp('Error - XSWDOP; check the input data file ');
      disp('  ');
      return
   end

%  Enter the weighting factors
   
   aa = 'Enter the weighting factor for LOS # ';
   for k = 1:nrow
      aaa = [aa num2str(k) ': ']; 
      wf(k) = input(aaa);
   end
      
%  Compute WDOP quantities

   [swgdop,swpdop,swhdop,swvdop,swtdop,wdops] = swdop(tt,wf);

%  Save input data and results into an external file

   fprintf(f2,'\n************************************************************');
   fprintf(f2,'\n\n*****   Input data   ****** \n\n');
   for k = 1:nrow
      fprintf(f2,'LOS # %2.0f --> %12.7f %12.7f %12.7f\n',k,tt(k,1:3));
   end

   fprintf(f2,'\n');
   for k = 1:nrow
      fprintf(f2,'Weighting Factor # %2.0f --> %12.7f\n',k,wf(k));
   end

   fprintf(f2,'\n*****   Results from the program XSWDOP  *****\n\n');
   fprintf(f2,'Weighted Geometric Dilution of Precision (WGDOP) =%8.4f\n',...
               wdops(1));
   fprintf(f2,'Weighted Position Dilution of Precision (WPDOP)  =%8.4f\n',...
               wdops(2));  
   fprintf(f2,'Weighted Horizontal Dilution of Precision (WHDOP)=%8.4f\n',...
               wdops(3));  
   fprintf(f2,'Weighted Vertical Dilution of Precision (WVDOP)  =%8.4f\n',...
               wdops(4));  
   fprintf(f2,'Weighted Time Dilution of Precision (WTDOP)      =%8.4f\n\n',...
               wdops(5));

   for k = 1:nrow
      fprintf(f2,'sub-WGDOP %2.0f  = %9.4f\n',k,swgdop(k)); 
   end
   fprintf(f2,'max(sub-WGDOP)  = %9.4f\n',max(swgdop)); 
   fprintf(f2,'\n');

   for k = 1:nrow
      fprintf(f2,'sub-WPDOP %2.0f  = %9.4f\n',k,swpdop(k)); 
   end
   fprintf(f2,'max(sub-WPDOP)  = %9.4f\n',max(swpdop)); 
   fprintf(f2,'\n');

   for k = 1:nrow
      fprintf(f2,'sub-WHDOP %2.0f  = %9.4f\n',k,swhdop(k)); 
   end
   fprintf(f2,'max(sub-WHDOP)  = %9.4f\n',max(swhdop)); 
   fprintf(f2,'\n');

   for k = 1:nrow
      fprintf(f2,'sub-WVDOP %2.0f  = %9.4f\n',k,swvdop(k)); 
   end
   fprintf(f2,'max(sub-WVDOP)  = %9.4f\n',max(swvdop)); 
   fprintf(f2,'\n');

   for k = 1:nrow
      fprintf(f2,'sub-WTDOP %2.0f  = %9.4f\n',k,swtdop(k)); 
   end
   fprintf(f2,'max(sub-WTDOP)  = %9.4f\n',max(swtdop)); 

   fprintf(f2,'\n************************************************************\n\n');

%  Select another computation, if desired

   answer2 = input('Do you want another computation? (y/n)[n] ','s');
   if isempty(answer2)
      answer2 = 'n';
   end   
   disp('  ');

end

disp('End of the program XSWDOP ');
disp('  ');

⌨️ 快捷键说明

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