Global Positioning System Reference
In-Depth Information
% DECODE1.M decode navigation data in subfram 1 into
ephermeris data
function[week no, tgd, toc, af2, af1, af0,
iode1,tow1]=decode1(points,navdata);
nsat=length(points);
for m=1:nsat;
week no(m)=bi2de(navdata(m,points(m)-1+70:-1:points(m)-
1+61));
tgd(m)=comp2dec(navdata(m,points(m)-1+204:-1:points(m)-
1+197),-31);
toc(m)=bi2de(navdata(m,points(m)-1+234:-1:points(m)-
1+219))*2^4;
af2(m)=comp2dec(navdata(m,points(m)-1+248:-1:points(m)-
1+241),-55);
af1(m)=comp2dec(navdata(m,points(m)-1+264:-1:points(m)-
1+249),-43);
af0(m)=comp2dec(navdata(m,points(m)-1+292:-1:points(m)-
1+271),-31);
iode1(m,:)=[navdata(m,points(m)-1+211:points(m)-1+218)];
tow1(m)=bi2de(navdata(m,points(m)-1+47:-1:points(m)-
1+31))*6;
end
Search WWH ::




Custom Search