I have followed the the suggestion and i wrote this code that is now working in the magnetic compass.
heading is my compass variable (001 ~359)
crc is the nmea checksum
crccalc:
crc= "H"^"D"^"M"^"," ^ ((heading DIG 0)+"0") ^ ((heading DIG 1)+ "0") ^ ((heading DIG 2)+"0")^"."^ "0"
Return
the output is like this:
$HDM,279.0*4F
acjacques
Bookmarks