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

📄 swdop.m

📁 GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角度变换; 3、坐标系转换: &#61656 点变换; &#61656 矩阵变换; &#61656 向量变换
💻 M
字号:
%                            swdop.m
%  Scope:   This MATLAB macro computes sub-weighted dilution of precision 
%           (sub-WDOP) quantities, i.e. WDOP quantities for all satellites
%           subsets obtained from eliminating one satellite from the original 
%           set.
%  Usage:   [swgdop,swpdop,swhdop,swvdop,swtdop,wdops] = swdop(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)
%           swgdop - output, sub-WGDOP for all satellites subsets 
%           swpdop - output, sub-WPDOP for all satellites subsets 
%           swhdop - output, sub-WHDOP for all satellites subsets
%           swvdop - output, sub-WVDOP for all satellites subsets  
%           swtdop - output, sub-WTDOP for all satellites subsets
%           wdops  - output, weighted dilution of precision quantities for 
%                    the complete set of satellites
%                    wdops(1) = geometric dilution of precision (WGDOP) 
%                    wdops(2) = position dilution of precision (WPDOP)
%                    wdops(3) = horizontal dilution of precision (WHDOP)
%                    wdops(4) = vertical dilution of precision (WVDOP)
%                    wdops(5) = time dilution of precision (WTDOP)
%  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.
%  Remark:  Five or more satellites are needed for the computation of sub-WDOP.
%           The sub-WHDOP is useful in the RAIM detection process [1], [2].
%  Last update:  08/05/00
%  Copyright (C) 1997-00 by LL Consulting. All Rights Reserved.

function  [swgdop,swpdop,swhdop,swvdop,swtdop,wdops] = swdop(g,wf)

[nrow,ncol] = size(g);
if (ncol ~= 3) | (nrow < 5)
   error('Error -  SWDOP; check the unit line of sight vectors');
end
if nrow ~= length(wf)
   error('Error -  SWDOP; 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

wdop = inv(h'* htemp);                        %  form the matrix  WDOP

temp1 = wdop(1,1) + wdop(2,2) + wdop(3,3) + wdop(4,4);    %  WGDOP
temp2 = wdop(1,1) + wdop(2,2) + wdop(3,3);                %  WPDOP
temp3 = wdop(1,1) + wdop(2,2);                            %  WHDOP
temp4 = wdop(3,3);                                        %  WVDOP 
temp5 = wdop(4,4);                                        %  WTDOP
wdops(1) = sqrt(temp1);
wdops(2) = sqrt(temp2);
wdops(3) = sqrt(temp3);
wdops(4) = sqrt(temp4);
wdops(5) = sqrt(temp5);

%  Determine sub-WDOP quantities

a = wdop * h';
b = h * a;			      %  only the diagonal elements are needed

for k = 1:nrow
   swgdop(k) = sqrt(temp1 + (a(1,k)*a(1,k) + a(2,k)*a(2,k) + ...
               a(3,k)*a(3,k) + a(4,k)*a(4,k)) / (1./wf(k) - b(k,k)));
   swpdop(k) = sqrt(temp2 + (a(1,k)*a(1,k) + a(2,k)*a(2,k) + ... 
               a(3,k)*a(3,k)) / (1./wf(k) - b(k,k)));
   swhdop(k) = sqrt(temp3 + (a(1,k)*a(1,k) + a(2,k)*a(2,k)) / ...
               (1./wf(k) - b(k,k)));
   swvdop(k) = sqrt(temp4 + a(3,k)*a(3,k) / (1./wf(k) - b(k,k)));
   swtdop(k) = sqrt(temp5 + a(4,k)*a(4,k) / (1./wf(k) - b(k,k)));
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -