UWBIns/lib/gnss/ch_gpsdop.m

13 lines
393 B
Matlab
Raw Normal View History

2025-04-16 20:15:33 +08:00
function [VDOP, HDOP, PDOP, GDOP] = ch_gpsdop(G, lat, lon)
% GPSԭ<53><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD> л<><D0BB> DOP<4F>½<EFBFBD>
S = [-sin(lon) cos(lon) 0; -sin(lat)*cos(lon) -sin(lat)*sin(lon) cos(lat); cos(lat)*cos(lon) cos(lat)*sin(lon) sin(lat)];
S = [S [0 0 0]'; [0 0 0 1]];
H = (G'*G)^(-1);
H = S*H*S';
VDOP = sqrt(H(3,3));
HDOP = sqrt(H(1,1) + H(2,2));
PDOP = sqrt (H(1,1) + H(2,2) + H(3,3));
GDOP = sqrt(trace(H));
end