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

📄 sdop.m

📁 功能极全的GPS开发工具箱
💻 M
字号:
%                               sdop.m
%  Scope:   This MATLAB macro computes sub-dilution of precision (sub-DOP)
%           quantities, i.e. DOP quantities for all satellites subsets obtained 
%           from eliminating one satellite from the original set. Five or more 
%           satellites are needed for the computation of sub-DOP.
%  Usage:   [sgdop,spdop,shdop,svdop,stdop,dops] = sdop(g)
%  Description of parameters:
%           g     - input, line-of-sight unit vectors, each vector is
%                   stored in another row (it should be 3 columns)
%           sgdop - output, sub-GDOP for all satellites subsets 
%           spdop - output, sub-PDOP for all satellites subsets 
%           shdop - output, sub-HDOP for all satellites subsets
%           svdop - output, sub-VDOP for all satellites subsets
%           stdop - output, sub-TDOP for all satellites subsets
%           dops  - output, dilution of precision quantities for the complete
%                   set of satellites
%                   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)
%  Remark:  The sub-HDOP is useful in the RAIM detection process [1], [2].
%  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.
%  Last update: 08/05/00
%  Copyright (C) 1997-00 by LL Consulting. All Rights Reserved.

function  [sgdop,spdop,shdop,svdop,stdop,dops] = sdop(g)

[nrow,ncol] = size(g);
if (ncol ~= 3) | (nrow < 5)
   error('Error -  SDOP; check the unit line of sight vectors');
end
unitvec = ones(nrow,1);

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

%  Determine DOP quantities

dop = inv(h'* h);

temp1 = dop(1,1) + dop(2,2) + dop(3,3) + dop(4,4); 
temp2 = dop(1,1) + dop(2,2) + dop(3,3); 
temp3 = dop(1,1) + dop(2,2); 
temp4 = dop(3,3); 
temp5 = dop(4,4);                                
dops(1) = sqrt(temp1);        %  GDOP 
dops(2) = sqrt(temp2);        %  PDOP
dops(3) = sqrt(temp3);        %  HDOP
dops(4) = sqrt(temp4);        %  VDOP 
dops(5) = sqrt(temp5);        %  TDOP

%  Determine sub-DOP quantities

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

for k = 1:nrow
   sgdop(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. - b(k,k)));
   spdop(k) = sqrt(temp2 + (a(1,k)*a(1,k) + a(2,k)*a(2,k) + ... 
              a(3,k)*a(3,k)) / (1. - b(k,k)));
   shdop(k) = sqrt(temp3 + (a(1,k)*a(1,k) + a(2,k)*a(2,k)) / ...
              (1. - b(k,k)));
   svdop(k) = sqrt(temp4 + a(3,k)*a(3,k) / (1. - b(k,k)));
   stdop(k) = sqrt(temp5 + a(4,k)*a(4,k) / (1. - b(k,k)));
end

⌨️ 快捷键说明

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