Hello All,
I am trying to do this equation in a function Node -
RAW = sensor value = w. I am writing it like this -
var VWC = 6.771 * math.pow(10, -10) * math.pow(w, -3)-5.105 * math.pow(10, -6) * math.pow(w, 2) + 1.302 * math.pow(10, -2) * w -10.848;
and it is returning this error -
ReferenceError: math is not defined (line 3, col 19)
This is the full script in the function node -
var w = msg.payload.col14;
var VWC = 6.771 * math.pow(10, -10) * math.pow(w, -3)-5.105 * math.pow(10, -6) * math.pow(w, 2) + 1.302 * math.pow(10, -2) * w -10.848;
msg.payload=VWC
return msg;
Does anyone possibly know if I'm close or a million miles away?
If anyone knows how to fix it would be fantastic.