Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.


Checksum in nmea


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-15-2008, 02:42 PM
Knows the basics
 
Join Date: Apr 2007
Location: Steinheim, Germany
Posts: 67
Default Checksum in nmea

Hi,
maybe someone can use it:
Code:
Sub Globals
	'dll: bitwise.dll, object: bit
	nmea = "$GPGGA,161649.417,4841.7903,N,01004.0221,E,2,05,2.0,578.3,M,48.0,M,1.0,0000*7D" 'example
	Dim checksum
	n = 1
End Sub

Sub App_Start
	Form1.Show
	bit.New1
	sign = StrAt(nmea,1)
	Do Until sign = "*"
		sign = Int(Asc(sign))
		checksum = bit.XOR(checksum,sign)
		n = n + 1
		sign = StrAt(nmea,n)
	Loop
	Msgbox("ASCII:  " & checksum & crlf & "HEX:    " & StrToUpper(bit.DecToHex(checksum)))
End Sub
__________________
Thanks for all
wolfgang
___________________
Desktop: Dual Core 3.0 GHz, XP SP3
Device: IPAQ 3970 WM 2003, Asus 632N WM5, HTC 3650 Cruise
GPS: Clip-on Bluetooth, Navman 3000
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read NMEA from Server schimanski Questions & Help Needed 42 05-13-2008 09:42 AM
Simple NMEA logger Bruno Share Your Creations 0 05-02-2008 08:43 PM
Probleme beim Lesen eines NMEA-Protokolls schimanski German Forum 0 12-09-2007 06:20 PM


All times are GMT. The time now is 07:11 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0