OpenMarine

Full Version: NMEA Checksum in Node-Red
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Am working on custom NMEA sentences for a wind sensor, now i do have the whole sequence complete up to the checksum at the final end, checksum is calculated correctly when i compare this with a NMEA simulator but what i can see is that the calculated checksum in Node Red ends with a small letter while the correct format must be in Capital letter.  
i have an example overhere : 
$WIMTA,22.5,C*1E is send out from a NMEA simulator 
$WIMTA,22.5,C*1e is send out from Node Red,
it are just the Alphabethical letters in the checksum which are in small and which must be capital to be conform the NMEA standard. Anyone out there who can help me ??
try > checksum = checksum.toString(16).toUpperCase();

Brief look it might not matter, signalk or Opencpn don´t seem to care. Looks better though ?

Have you tried the data fiddler in signalk server yet? Can be handy to paste in NMEA or signalk & see what happens.

[Image: DTl2TWe.png]
Indeed, ToUpperCase did the trick. At least the checksum is now a neat string. Thanks for the hint.
Haven´t worked with SignalK yet, as i don´t want to start with two things at the same time, Node Red gives me already enough time to keep myself busy :-)
Will check out Signal K in the near future, first would like to learn something more about Node Red.
(2023-03-29, 02:40 AM)Arnie419 Wrote: [ -> ]Indeed, ToUpperCase did the trick. At least the checksum is now a neat string. Thanks for the hint.
Haven´t worked with SignalK yet, as i don´t want to start with two things at the same time, Node Red gives me already enough time to keep myself busy :-)
Will check out Signal K in the near future, first would like to learn something more about Node Red.

Might make more sense to use the  node-red app inside signalk from the start, Node red can do more running inside signalk.
I used the function on the following link to calculate a checksum that I found while making my flow to output a proprietary Furuno sentence:

https://flows.nodered.org/flow/6e4031351...e8c217e5e1