View previous topic :: View next topic |
Author |
Message |
on7nh
Joined: 05 Jun 2006 Posts: 41 Location: Belgium
|
calculating GPS checksum |
Posted: Tue Nov 28, 2006 2:02 pm |
|
|
hello folks,
i am searching now a few days for a example for calculating a Xor checksum from a GPS string :
the string sounds like = "$GPWPL,0051.123,N,00004.568,E,MOTO1"
have anybody a idea to do this?
thanks,
ON7NH
Carl |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Nov 28, 2006 2:26 pm |
|
|
I don't think you could search for a few days. In just a few seconds I
can find the answer with http://www/google.com by searching for this
search string:
Quote: | NMEA-0183 checksum |
Or search on the CCS forum for:
Quote: | NMEA-0183 checksum |
Then you find one of my old posts with a routine.
http://www.ccsinfo.com/forum/search.php |
|
|
Guest
|
|
Posted: Wed Nov 29, 2006 1:32 am |
|
|
I know how to calculate the checksum =-)
the problem i have is that i need a instruction like mid$ in VB
this is what i have know :
Code: |
for( i=0; i<lengte; i++ )
{
// here i need the code to seleckt each character in the string
fprintf(serial,"%s\n\r",character);
sumcheck = sumcheck ^ character;
}
|
|
|
|
davekelly
Joined: 04 Oct 2006 Posts: 53 Location: Berkshire, England
|
|
Posted: Wed Nov 29, 2006 2:25 am |
|
|
That's just basic c programming for character arrays
Code: |
sumcheck = sumcheck ^ inputString [i];
|
|
|
|
|