📄 slopemax.m
字号:
% slopemax.m
% Scope: This MATLAB macro determines slopemax value for the Receiver
% Autonomous Integrity Monitoring (RAIM) baseline standard algorithm
% (constant alarm rate algorithm) [1]. It is assumed that at least
% five line-of-sight unit vectors are specified as input.
% Usage: xoutput = slopemax(g)
% Description of parameters:
% g - input, line-of-sight unit vectors, each vector is
% stored in another row (it should be 3 columns)
% xoutput - output, value of the slopemax
% Reference:
% [1] 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.
% Last update: 07/31/00
% Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.
function xoutput=slopemax(g)
[nrow,ncol] = size(g);
if (ncol ~= 3) | (nrow < 5)
error('Error - SLOPEMAX; check the unit line of sight vectors');
end
unitvec = ones(nrow,1);
slope2 = zeros(1,nrow);
h = [g unitvec]; % form the matrix H
a = (inv(h'* h)) * h';
b = h * a;
for k = 1:nrow
slope2(k) = (nrow - 4) * ( a(1,k)*a(1,k) + a(2,k)*a(2,k) ) / ...
(1. - b(k,k));
end
xoutput = sqrt(max(slope2));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -