📄 xfdnt.m
字号:
% xfdnt.m
% Scope: This MATLAB program determines the fault detection normalized
% thresholds used in the Receiver Autonomous Integrity Monitoring
% (RAIM), for a specified input data set.
% Usage: xfdnt
% Inputs: - input data for probability of false alarm; a default value
% (of 3.33333e-7) can be selected
% - name of the output file (optional); the default is the screen
% Outputs: - values of the selected input data
% - computed fault detection normalized thresholds (for each degree
% of freedom, from 1 to 16)
% Remarks:
% 1) For the first degree of freedom case a Gaussian distribution is
% assumed, while for higher degree of freedom cases a Chi-square
% distribution are assumed.
% 2) For the RAIM with constant false alarm thresholds [2], the un-
% normalized test statistic thresholds can be determined as follows:
% test statistic thresholds = (normalized threshold) * (standard
% deviation of the measurement error).
% 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: chi2_dof, fdnt, gauss_1
% Last update: 11/233/00
% Copyright (C) 1997-00 by LL Consulting. All Rights Reserved.
clear
yes = 'y';
global dof
% Enter probability of false alarm
disp(' ');
disp('Enter the probability of false alarm ');
answer = input('Do you want to use the default data 3.3333e-7? (y/n)[n] --> ','s');
if (strcmp(answer,yes) == 1)
fa_tol = 3.33333e-7;
else
fa_tol = input('Enter the false alarm tolerance --> ');
end
if (fa_tol < 0) | (fa_tol > 1)
error('Error - XFDNT ; check the input data value for fa_tol ');
end
% Save computed results into an external file or display on screen
disp(' ');
disp('Enter the output desired (output file or on screen)');
answer = input('Do you want to display the results on screen? (y/n)[n] --> ','s');
disp(' ');
if (strcmp(answer,yes) == 1)
f2 = 1; % on screen
else
f2 = input('Specify the output filename --> ','s');
disp(' ');
end
% Determine fault detection normalized thresholds
for k = 1:16
fprintf('Computation in progress for degree of freedom = %3.0f\n',k);
dof = k;
xoutput(k) = fdnt(fa_tol);
end
% Display/save the results
fprintf(f2,'\n***************************************************************\n');
fprintf(f2,'\n*** COMPUTATION OF FAULT DETECTION NORMALIZED THRESHOLDS ***\n');
fprintf(f2,'*** for RAIM with constant false alarm ***\n');
fprintf(f2,'\n***************************************************************\n');
fprintf(f2,'\n***** Input data *****\n');
fprintf(f2,'\nProbability of false alarm = %e \n\n',fa_tol);
fprintf(f2,'***** Results by using XFDNT *****\n\n');
for k = 1:16
fprintf(f2,'Degree of freedom = %3.0f ==> ',k);
fprintf(f2,'Normalized threshold = %10.5f\n',xoutput(k));
end
fprintf(f2,'\n***************************************************************\n');
disp(' ');
disp('End of the program XFDNT');
disp(' ');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -