📄 dop2.m
字号:
% dop2.m
% Scope: This MATLAB macro computes dilution of precision (DOP) quantities
% when four line-of-sight unit vectors are specified, by using a
% direct method.
% Usage: dops = dop2(g)
% Description of parameters:
% g - input, line-of-sight unit vectors, each vector is
% stored in another row (it should be 3 columns)
% dops - output, dilution of precision quantities
% dops(1) = geometric dilution of precision (GDOP)
% dops(2) = position dilution of precision (PDOP)
% dops(3) = horizontal dilution of precision (HDOP)
% dops(4) = vertical dilution of precision (VDOP)
% dops(5) = time dilution of precision (TDOP)
% Last update: 06/14/00
% Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.
function dops = dop2(g)
[nrow,ncol] = size(g);
if (ncol ~= 3) | (nrow ~= 4)
error('Error - DOP2 ; check the unit line of sight vectors');
end
unitvec = ones(nrow,1);
h = [g unitvec]; % form the matrix H
% Determine DOP quantities
hinv = inv(h);
dop = hinv * hinv';
dops(1) = sqrt(dop(1,1) + dop(2,2) + dop(3,3) + dop(4,4)); % GDOP
dops(2) = sqrt(dop(1,1) + dop(2,2) + dop(3,3)); % PDOP
dops(3) = sqrt(dop(1,1) + dop(2,2)); % HDOP
dops(4) = sqrt(dop(3,3)); % VDOP
dops(5) = sqrt(dop(4,4)); % TDOP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -