CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

calculating GPS checksum

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
on7nh



Joined: 05 Jun 2006
Posts: 41
Location: Belgium

View user's profile Send private message Visit poster's website MSN Messenger

calculating GPS checksum
PostPosted: Tue Nov 28, 2006 2:02 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Nov 28, 2006 2:26 pm     Reply with quote

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








PostPosted: Wed Nov 29, 2006 1:32 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Nov 29, 2006 2:25 am     Reply with quote

That's just basic c programming for character arrays

Code:

sumcheck = sumcheck ^ inputString [i];
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group