⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wdop2.m

📁 功能极全的GPS开发工具箱
💻 M
字号:
%                             wdop2.m
%  Scope:   This MATLAB macro computes weighted dilution of precision (WDOP) 
%           quantities when four line-of-sight unit vectors are specified, 
%           by using a direct method.
%  Usage:   wdops = wdop2(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 = wdop2(g,wf)

[nrow,ncol] = size(g);
if (ncol ~= 3) | (nrow ~= 4)
   error('Error -  WDOP2; check the unit line of sight vectors');
end
if nrow ~= length(wf)
   error('Error -  WDOP2; check the dimension of the weighting factors');
end

unitvec = ones(nrow,1);

h = [g unitvec];                              %  form the matrix  H

%  Determine WDOP quantities

htinv = inv(h');
for k = 1:nrow           
   htemp(k,:) = htinv(k,:) / wf(k);
end
wdop = htinv'* htemp;

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 + -