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

袁兆奎 <[email protected]> Fri, 24 Apr 2009 16:07:24 +0800 (CST)
Newsgroups gmane.comp.hardware.gps.opensource
Message-ID <[email protected]>
--===============3657617968389740719==
Content-Type: multipart/alternative; 
	boundary="----=_Part_214368_3070093.1240560444599"

------=_Part_214368_3070093.1240560444599
Content-Type: text/plain; charset=gbk
Content-Transfer-Encoding: quoted-printable

hello everyone:

    I=A1=A1have 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:

    for (sfr =3D 1; sfr <=3D 5; sfr++)
    {
        /* sfptr=D2=C6=B5=BD=C4=B3=D2=BB=B8=F6=D7=D3=D6=A1 */
        sfptr =3D sf[sfr] + 1;

        /* =B1=E9=C0=FA=C3=BF=D2=BB=B8=F6=D7=D6 */
        for (word =3D 1; word <=3D 10; word++)
        {
            scale =3D 0x20000000L;  /* =B6=FE=BD=F8=D6=C6=CE=AA100000000000=
000000000000000000=A3=AC30=CE=BB */
            *sfptr =3D 0;

            /* =B1=E9=C0=FA=C4=B3=D2=BB=B8=F6=D7=D6=B5=C430bit */
            for (i =3D 0; i < 30; i++)
            {
                if (*data_msg_ptr & chmask)
                    *sfptr |=3D scale;
               =20
                scale =3D scale >> 1;
                data_msg_ptr++;
            }
            sfptr++;
        }
    }

    I am so wondered now about this loop, can anyone give me some explanati=
on? Thank you first!

                                                                      yours=
 sincrcely,
                                                                       Yuan=
 Zhaokui


------=_Part_214368_3070093.1240560444599
Content-Type: text/html; charset=gbk
Content-Transfer-Encoding: quoted-printable

hello everyone:<br><br>&nbsp;&nbsp;&nbsp; I=A1=A1have a question in the fun=
ction "void navmess (int prn, int ch)" in file gpsfuncs.c which has trouble=
d 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=D2=C6=B5=BD=C4=B3=D2=BB=B8=F6=D7=D3=D6=A1 */<br>&nbsp;&nbsp;&nbsp; &n=
bsp;&nbsp;&nbsp; sfptr =3D sf[sfr] + 1;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nb=
sp;&nbsp; /* =B1=E9=C0=FA=C3=BF=D2=BB=B8=F6=D7=D6 */<br>&nbsp;&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;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp; scale =3D 0x20000000L;&nbsp; /* =B6=FE=BD=F8=D6=C6=CE=AA10000=
0000000000000000000000000=A3=AC30=CE=BB */<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp; *sfptr =3D 0;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&=
nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* =B1=E9=C0=FA=C4=B3=D2=BB=B8=F6=D7=D6=B5=
=C430bit */<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>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp; if (*data_msg_ptr &amp; chmask)<br>&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *s=
fptr |=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;&nbsp; scale =3D scale &gt;&gt; 1;<br>&nbsp;&nbsp;&nbsp;=
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; data_msg_ptr++;<b=
r>&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;&n=
bsp; I am so wondered now about this loop, can anyone give me some explanat=
ion? Thank you first!<br><br>&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; &nbsp; &nbsp;&nbsp; yours sincrcely,<br>&=
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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Yuan Zhaokui<br><br><br><!-- f=
ooter --><br><span title=3D"neteasefooter"/><hr/>
<a href=3D"http://email.163.com">=CD=F8=D2=D7=D3=CA=CF=E4=A3=AC=D6=D0=B9=FA=
=B5=DA=D2=BB=B4=F3=B5=E7=D7=D3=D3=CA=BC=FE=B7=FE=CE=F1=C9=CC</a>
</span>
------=_Part_214368_3070093.1240560444599--



--===============3657617968389740719==
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

--===============3657617968389740719==--