Re: question in the function navmess(int prn, int ch)

Clifford Kelley <[email protected]> Wed, 29 Apr 2009 19:06:59 -0700 (GMT-07:00)
Newsgroups gmane.comp.hardware.gps.opensource
Message-ID <25394462.1241057219832.JavaMail.root@elwamui-hound.atl.sa.earthlink.net>
--===============8005519340627924297==
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<HEAD>
<STYLE>body{font-family: Geneva,Arial,Helvetica,sans-serif;font-size:9pt;ba=
ckground-color: #ffffff;color: black;}</STYLE>

<META content=3D"MSHTML 6.00.6001.18226" name=3DGENERATOR></HEAD>
<BODY id=3DcompText>
<P>This part of the code takes the packed data bits (one bit per channel)&n=
bsp; and assembles it into the 30 bit words and subframes.&nbsp; One frame =
is converted into a navigation message.</P>
<P>Cliff<BR><BR><BR></P>
<BLOCKQUOTE style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 0px; BORDER-LEFT: #000=
0ff 2px solid">-----Original Message----- <BR>From: =E8=A2=81=E5=85=86=E5=
=A5=8E <[email protected]><BR>Sent: Apr 24, 2009 1:07 AM <BR>To: cwkelley@e=
arthlink.net <BR>Cc: [email protected] <BR>Subject: questio=
n in the function navmess(int prn, int ch) <BR><BR>hello everyone:<BR><BR>&=
nbsp;&nbsp;&nbsp; I=E3=80=80have a question in the function "void navmess (=
int prn, int ch)" in file gpsfuncs.c which has troubled me for quite a bit =
of time. In this function, there is a loop as follows:<BR><BR><FONT size=3D=
2>&nbsp;&nbsp;&nbsp; for (sfr =3D 1; sfr &lt;=3D 5; sfr++)<BR>&nbsp;&nbsp;&=
nbsp; {<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* sfptr=E7=A7=BB=E5=88=B0=
=E6=9F=90=E4=B8=80=E4=B8=AA=E5=AD=90=E5=B8=A7 */<BR>&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; sfptr =3D sf[sfr] + 1;<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp=
;&nbsp; /* =E9=81=8D=E5=8E=86=E6=AF=8F=E4=B8=80=E4=B8=AA=E5=AD=97 */<BR>&nb=
sp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (word =3D 1; word &lt;=3D 10; word++=
)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; &nbsp;&n=
bsp;&nbsp; &nbsp;&nbsp;&nbsp; scale =3D 0x20000000L;&nbsp; /* =E4=BA=8C=E8=
=BF=9B=E5=88=B6=E4=B8=BA100000000000000000000000000000=EF=BC=8C30=E4=BD=8D =
*/<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *sfptr =3D 0=
;<BR><BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* =E9=81=
=8D=E5=8E=86=E6=9F=90=E4=B8=80=E4=B8=AA=E5=AD=97=E7=9A=8430bit */<BR>&nbsp;=
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (i =3D 0; i &lt; 30;=
 i++)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<BR>&nbs=
p;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if =
(*data_msg_ptr &amp; chmask)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *sfptr |=3D scale;<BR>&=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&n=
bsp; scale =3D scale &gt;&gt; 1;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; data_msg_ptr++;<BR>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&=
nbsp; &nbsp;&nbsp;&nbsp; sfptr++;<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
}<BR>&nbsp;&nbsp;&nbsp; }</FONT><BR><BR>&nbsp;&nbsp;&nbsp; I am so wondered=
 now about this loop, can anyone give me some explanation? Thank you first!=
<BR><BR>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp;&nbsp; yours sincrcely,<BR>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; Yuan Zhaokui<BR><BR><BR><ZZZ!-- -- footer><BR><SPAN=
 title=3Dneteasefooter>
<HR>
<A href=3D"http://email.163.com" target=3D_blank>=E7=BD=91=E6=98=93=E9=82=
=AE=E7=AE=B1=EF=BC=8C=E4=B8=AD=E5=9B=BD=E7=AC=AC=E4=B8=80=E5=A4=A7=E7=94=B5=
=E5=AD=90=E9=82=AE=E4=BB=B6=E6=9C=8D=E5=8A=A1=E5=95=86</A> </SPAN></BLOCKQU=
OTE></BODY>


--===============8005519340627924297==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
opensource_gps mailing list
[email protected]
http://lists.psas.pdx.edu/cgi-bin/mailman/listinfo/opensource_gps

--===============8005519340627924297==--