OpenMarine
Built new NMEA sentence with Barometric pressure inhg and millibars - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3)
+--- Thread: Built new NMEA sentence with Barometric pressure inhg and millibars (/showthread.php?tid=4549)



Built new NMEA sentence with Barometric pressure inhg and millibars - Arnie419 - 2023-03-28

Am trying to rebuilt a a existing NMEA sentence into a new sentence which contains Inches of Mercury and Millibars, however i am litle stuck on this.
I have a sensor which is putting out a fixed number without decimal point so need to get that into a number with 2 numbers.
1 mBar seems to be 0.029529983071445 inhg according to NOAA.

The following NMEA sentence needs to be build:
$WIMMB,29.83,I,1010.3,B*64
Where, 29.82 = value in inhg (inches per Mercury)
I = indicator for Inches
1010.3 = pressure in mBars
B= indicator for Bar

When i use the following code in Node-Red as seen in attachment it shows me only the first half of the sentence (with mBar at the wrong place but that´s only to show if the string is working, needs conversion there).
Is anyone able to assist me to get this string complete with correct indication of inhg and Mbar with 2 decimals behind the digit??.

By the way, during another conversion i figured out that the checksum is calculated with a small alphabetical letter instead of a capital letter according to NMEA standards, OpenCPN is accepting this sentence but obviously the sentence is not 100% according NMEA protocol, is there any way to change small letters into capital regarding checksum??

Hope somebody can help me.


RE: Built new NMEA sentence with Barometric pressure inhg and millibars - yiannis - 2023-03-28

(2023-03-28, 07:33 AM)Arnie419 Wrote: Am trying to rebuilt a a existing NMEA sentence into a new sentence which contains Inches of Mercury and Millibars, however i am litle stuck on this.
I have a sensor which is putting out a fixed number without decimal point so need to get that into a number with 2 numbers.
1 mBar seems to be 0.029529983071445 inhg according to NOAA.

The following NMEA sentence needs to be build:
$WIMMB,29.83,I,1010.3,B*64
Where, 29.82 = value in inhg (inches per Mercury)
I = indicator for Inches
1010.3 = pressure in mBars
B= indicator for Bar

When i use the following code in Node-Red as seen in attachment it shows me only the first half of the sentence (with mBar at the wrong place but that´s only to show if the string is working, needs conversion there).
Is anyone able to assist me to get this string complete with correct indication of inhg and Mbar with 2 decimals behind the digit??.

By the way, during another conversion i figured out that the checksum is calculated with a small alphabetical letter instead of a capital letter according to NMEA standards, OpenCPN is accepting this sentence but obviously the sentence is not 100% according NMEA protocol, is there any way to change small letters into capital regarding checksum??

Hope somebody can help me.
You have an extra comma there.

   

Punctuation is the difference between letting your uncle Jack, off a horse and letting your uncle, jack off a horse!  Big Grin


RE: Built new NMEA sentence with Barometric pressure inhg and millibars - Arnie419 - 2023-03-29

Ahh, yes that was the error, was late already so mistakes happens quickly.
Thanks for the hint.
Btw. shouldn´t jack off a horse...... :-)