[rcpilot-devs] Re: [rcpilot-site] Problems with Rcap source code
Status: Beta
Brought to you by:
mjpawlowsky
From: Michael J. P. <mi...@mi...> - 2005-06-17 23:28:48
|
A & RG Demir wrote: > Hello Mike > > Thanks for your reply . > > The following is the problem I came across with the RCAP source code . > > 1 . I can not find a call to subroutine "GetPos:" in the program > listing . > Do a find in any text editor.. It's there :-) ================================= ' Get the start position of gpsdata for a specific field ' The field we are looking for is specified in the var "field" ' We return the position of the specified field back in the var "field" GetPos: ================================================================== > 2. Subroutine DoB or DoC line 2 : Should cs=$8 be there ? cs is not > known until after return from subroutine DoCS . Read the comments... ;-) cs = $8 ' This is the checksum of "GPRMB" If you calculated the the checksum of "GPRMB" it is $8. So since that is always constant, it simply avoids calculating the checkcum for those chars everytime. > > 3. Subroutine DoB line 8: field=12 (Bearing to destination) . Where is > the field number 12 obtained from . Is it the position of gpsdata > array element [12] (GPRMB sentence) ? I find it to be in gpsdata array > element [48] . > The size of a field is not constant. So we can't tell what byte position we want. However the field positions are constant. Again if we read the comments.... field = 12 ' Tell GetNumField which field we want And then look at the GetNumField subrouting you will see that it returns the value of the 12th field. Cheers, Mike P.S. This I'm moving this to the developpers list, since it has nothing to do with the web site. The web site list was created for people that were going to create the site. |