📄 wdop1.m
字号:
% wdop1.m
% Scope: This MATLAB macro computes weighted dilution of precision (WDOP)
% quantities when at least three line-of-sight unit vectors are
% specified, by using a direct method.
% Remark: When less than four line-of-sight unit vectors are specified
% the computation is not fully significant, and it is conducted
% by using a pseudoinverse matrix instead of an inverse matrix.
% Usage: wdops = wdop1(g,wf)
% Description of parameters:
% g - input, line-of-sight unit vectors, each vector is
% stored in another row (it should be 3 columns)
% wf - input, array containing weighting factors, it should be
% one weighting factor for each line-of-sight unit vector
% (in the same order)
% wdops - output, weighted dilution of precision quantities
% wdops(1) = weighted geometric dilution of precision (WGDOP)
% wdops(2) = weighted position dilution of precision (WPDOP)
% wdops(3) = weighted horizontal dilution of precision (WHDOP)
% wdops(4) = weighted vertical dilution of precision (WVDOP)
% wdops(5) = weighted time dilution of precision (WTDOP)
% Last update: 06/14/00
% Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.
function wdops = wdop1(g,wf)
[nrow,ncol] = size(g);
if (ncol ~= 3) | (nrow < 3)
error('Error - WDOP1; check the unit line of sight vectors');
end
if nrow ~= length(wf)
error('Error - WDOP1; check the dimension of the weighting factors');
end
unitvec = ones(nrow,1);
h = [g unitvec]; % form the matrix H
% Determine WDOP quantities
for k = 1:nrow % form the matrix wf * H
htemp(k,:) = wf(k) * h(k,:);
end
if nrow >= 4
wdop = inv(h'* htemp);
else
wdop = pinv(h'* htemp);
end
wdops(1) = sqrt(wdop(1,1) + wdop(2,2) + wdop(3,3) + wdop(4,4)); % WGDOP
wdops(2) = sqrt(wdop(1,1) + wdop(2,2) + wdop(3,3)); % WPDOP
wdops(3) = sqrt(wdop(1,1) + wdop(2,2)); % WHDOP
wdops(4) = sqrt(wdop(3,3)); % WVDOP
wdops(5) = sqrt(wdop(4,4)); % WTDOP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -