I am hoping for some guidance on how to perform (somewhat) complex math in Node-RED. My current flow that grabs some parameters from SQL and puts them into my strategy looks like this:
I need to perform some complex math using these two values. Specifically, if H4 and H5 are the values being retrieved from SQL, the formula that I want to use to produce a new value is:
I believe (acc. to this post) that I need to create a function node that contains something like this:
#include <cmath> msg.payload = (6*std::pow(10,47))/(std::pow(msg.payload,16.66)); return msg;
Based on the above, I can figure out how to write the formula in msg.payload, but where do I put a function node in my flow? It seems I would need to put it after the two groov write nodes.