Humidex index formula help

Hi,
can you help me to reproduce this formula in node red function?

Ta = temperature value
UR = humidity value

This suggests a slightly simpler approach which should be easier to translate to JavaScript - if only because it is clearer.

What is the Humidex formula used to find subjective temperature as a function of both measured temperature and relative humidity? (physlink.com)

You also need the dewpoint:

Tdc = 243.04*(LN(RH/100)+((17.625T)/(243.04+T)))/(17.625-LN(RH/100)-((17.625T)/(243.04+T)))

(243.04*(Math.log(RH/100)+((17.625Tc)/(243.04+Tc)))/(17.625-Math.log(RH/100)-((17.625Tc)/(243.04+Tc)))).toFixed(1);

Though you will need to convert that to Kelvins


However, you might find it a lot easier to use Heat Index rather than the Canadian Humidex. HI is based on relative humidity rather than Dew Point and so is generally much easier to work with since there are lots of sensors that will output humidity or it is available in weather forecasts.

Heat index - Simple English Wikipedia, the free encyclopedia

Ok ....
but in this site ...

I found a simplified formula and my problem is how to make this calculation
calcolo

1 Like

Well that translates to "10 to the power of (0.03 * temperature)"

Also note:

The index is applicable between temperatures of 20°C and 55°C

1 Like

Thank you ....

const TC = msg.payload.temperature // in celcius
const RH = msg.payload.humidity    // Relative humidity as %

// Humidex: http://www.centrometeo.com/articoli-reportage-approfondimenti/climatologia/5008-indici-humidex-temperatura-equivalente
const H = Number( (TC + (0.5555 * (0.06 * RH * Math.pow(10, 0.03 * TC) - 10))).toFixed(1) )
msg.payload.humidex = H

if ( H < 27 ) {
    msg.payload.humidexCategory = 'Well Being'
} else if ( H < 30 ) {
    msg.payload.humidexCategory = 'Caution'
} else if ( H < 40 ) {
    msg.payload.humidexCategory = 'Extreme Caution'
} else if (H < 55) {
    msg.payload.humidexCategory = 'Danger'
} else {
    msg.payload.humidexCategory = 'High Danger'
}

return msg

Thank you, thank you very much .......

No problem. I did it while listening in to a boring team meeting :smile_cat:

It was interesting. The calculation that is, not the meeting! I'll be adding to my environment data for sure.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.