2016-12-17, 05:24 PM
(2016-12-17, 04:17 PM)Tocher Wrote: Can anyone help me with the correct function to change this value to celcius (sustract 273.15). Is this done in Node-RED or earlier in openplotter/signalK
Import this function "Convert" for: m/s to kn, rad to deg, K to C
Code:
[{"id":"6798b965.b393e8","type":"function","z":"ad773e6c.c040d","name":"convert","func":"var numInput = Number(msg.payload);\n//convert m/s to kn\n//msg.payload = Math.round(numInput*19.43844492)/10;\n//convert rad to deg\n//msg.payload = Math.round(numInput*572.95779513)/10;\n//convert K to C\nmsg.payload = numInput-273.15;\nreturn msg;","outputs":1,"noerr":0,"x":192.49998474121094,"y":651.3999938964844,"wires":[[]]}]