This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NMEA Checksum in Node-Red
#1
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 ??
Reply
#2
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]
Reply
#3
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.
Reply
#4
(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.
Reply
#5
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)