kthermo(dewpoint)

koadrobot/devices/kthermo(dewpoint)

No description
kthermo(dewpoint)
@/kthermo(dewpoint)
TCnumber
Temperature in celcius.
RHnumber
Relative humidity in ragne [0.0, 1.0]
kthermo(dewpoint)
DEW
TC
RH
DEWnumber
Dew Point in celcius. (Raining temp at the same RH)
To use the node in your project you should have the koadrobot/devices library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx)
{
    const Number a = 17.271;
    const Number b = 237.7;

    Number c = getValue<input_TC>(ctx);
    Number h = getValue<input_RH>(ctx);

    Number tmp= (a*c)/(b+c)+log(h);
    Number dewPoint= (b*tmp)/(a-tmp);

    emitValue<output_DEW>(ctx, dewPoint);
}