Global Positioning System Reference
In-Depth Information
for k = 1:3;
gu(k) = gu(k) + dl(k);
%** find new position
end
erro=dl(1)^2+dl(2)^2+dl(3)^2; % find error
for j = 1:nsat;
rao(j)=((gu(1)-sp(1,j))^2+(gu(2)-
sp(2,j))^2+(gu(3)-sp(3,j))^2)^.5; % find new rao
without clock bias
end
end
% ***** Final result in spherical coordinate system *****
xuser = gu(1); yuser = gu(2); zuser = gu(3); bias = bu;
rsp = (xuser^2+yuser^2+zuser^2)^.5; % radius of spherical
earth
% Eq 2.17
Lc = atan(zuser/(xuser^2+yuser^2)^.5); % latitude of sperical
% earth Eq 2.18
lsp = atan(yuser/xuser)*180/pi; % longitude spherical and
flat
% earth Eq 2.19
% ***** Converting to practical earth shape *****
e=1/298.257223563;
Ltemp=Lc;
erro1=1;
while erro1>1e-6; % calculating latitude by Eq. 2.51
L=Lc+e*sin(2*Ltemp);
erro1=abs(Ltemp-L);
Ltemp=L;
end
Lflp=L*180/pi; % latitude of flat earth
re=6378137;
h=rsp-re*(1-e*(sin(L)^2)); % altitude of flat earth
lsp = lsp; % longitude of flat earth
upos = [xuser yuser zuser bias rsp Lflp lsp h]';
Search WWH ::




Custom Search