📄 xsdop.m
字号:
% xsdop.m
% Scope: This MATLAB program computes sub-dilution of precision (sub-DOP)
% quantities, i.e. DOP quantities for all satellites subsets obtained
% from eliminating one satellite from the original set.
% Inputs: - name of the output file containing the results if selected; the
% default in on screen
% - name of the input file containing line-of-sight unit vectors;
% each row contains a line-of-sight unit vector
% Outputs: - input/output data stored on the selected output file or
% displayed on screen
% Remarks: Five or more satellites are needed for the computation of sub-DOP.
% The sub-HDOP 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.
% Usage: xsdop
% External Matlab macros used: sdop
% 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
f2 = input('Specify the output file name (with extension) --> ','s');
else
f2 = 1; % output to the screen
end
answer2 = yes;
while (strcmp(answer2,yes) == 1)
clear tt dops sgdop spdop shdop svdop stdop
disp(' ');
f1 = input('Specify the input filename (with extension) --> ','s');
% Read the input data file
tt = load(f1);
[nrow,ncol] = size(tt);
if (ncol ~= 3) | (nrow < 5)
disp('Error - XSDOP; check the input data file ');
disp(' ');
return
end
% Compute sub-DOP quantities
[sgdop,spdop,shdop,svdop,stdop,dops] = sdop(tt);
% 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***** Results from the macro XSDOP.m ***** \n\n');
fprintf(f2,'Geometric Dilution of Precision (GDOP) = %9.4f\n',dops(1));
fprintf(f2,'Position Dilution of Precision (PDOP) = %9.4f\n',dops(2));
fprintf(f2,'Horizontal Dilution of Precision (HDOP) = %9.4f\n',dops(3));
fprintf(f2,'Vertical Dilution of Precision (VDOP) = %9.4f\n',dops(4));
fprintf(f2,'Time Dilution of Precision (TDOP) = %9.4f\n\n',dops(5));
for k = 1:nrow
fprintf(f2,'sub-GDOP %2.0f = %9.4f\n',k,sgdop(k));
end
fprintf(f2,'max{sub-GDOP) = %9.4f\n',max(sgdop));
fprintf(f2,'\n');
for k = 1:nrow
fprintf(f2,'sub-PDOP %2.0f = %9.4f\n',k,spdop(k));
end
fprintf(f2,'max{sub-PDOP) = %9.4f\n',max(spdop));
fprintf(f2,'\n');
for k = 1:nrow
fprintf(f2,'sub-HDOP %2.0f = %9.4f\n',k,shdop(k));
end
fprintf(f2,'max{sub-HDOP) = %9.4f\n',max(shdop));
fprintf(f2,'\n');
for k = 1:nrow
fprintf(f2,'sub-VDOP %2.0f = %9.4f\n',k,svdop(k));
end
fprintf(f2,'max{sub-VDOP) = %9.4f\n',max(svdop));
fprintf(f2,'\n');
for k = 1:nrow
fprintf(f2,'sub-TDOP %2.0f = %9.4f\n',k,stdop(k));
end
fprintf(f2,'max{sub-TDOP) = %9.4f\n\n',max(stdop));
fprintf(f2,'*********************************************************\n');
% Select another computation, if desired
disp(' ');
answer2 = input('Do you want another computation? (y/n)[n] ','s');
if isempty(answer2)
answer2 = 'n';
end
end
disp(' ');
disp('End of the program ');
disp(' ');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -