interesting, didn't know this humidex index and a quick google brought up this graph -

http://www.ccacac.com/wp-content/uploads/2010/06/Humidex-Graph.pdf -

dewpoint I know and I have written code for it in -

http://arduino.cc/playground/Main/DHT11Lib -

I like to add this humidex & heat index code to this lib too

refactored the humidex in two steps:

double humidex(double tempC, double DewPoint)

{

double e = 5417.7530*((1/273.16)-(1/(273.16 + DewPoint)));

double h = tempC + 0.5555 * ( 6.11 * exp (e) - 10);

return h;

}

=>

double humidex(double tempC, double DewPoint)

{

double e = 19.833625 - 5417.753 /(273.16 + DewPoint);

double h = tempC + 3.3941 * exp(e) - 5.555;

return h;

}

A quick try for the heatIndex -> note the temp is in Fahrenheit

(code not tried)

// http://en.wikipedia.org/wiki/Heat_index

double heatIndex(double tempF, double humidity)

{

double c1 = -42.38, c2 = 2.049, c3 = 10.14, c4 = -0.2248, c5= -6.838e-3, c6=-5.482e-2, c7=1.228e-3, c8=8.528e-4, c9=-1.99e-6 ;

double T = tempF;

double R = humidity;

double T2 = T*T;

double R2 = R*R;

double TR = T*R;

double rv = c1 + c2*T + c3*R + c4*T*R + c5*T2 + c6*R2 + c7*T*TR + c8*TR*R + c9*T2*R2;

return rv;

}

==>

double heatIndex(double tempF, double humidity)

{

double c1 = -42.38, c2 = 2.049, c3 = 10.14, c4 = -0.2248, c5= -6.838e-3, c6=-5.482e-2, c7=1.228e-3, c8=8.528e-4, c9=-1.99e-6 ;

double T = tempF;

double R = humidity;

double A = (( c5 * T) + c2) * T + c1;

double B = ((c7 * T) + c4) * T + c3;

double C = ((c9 * T) + c8) * T + c6;

double rv = (C * R + B) * R + A;

return rv;

}

// from 15 float multiplies to 8 float multiplies.

I assume that by only using the c1..c4 one can get a real fast (1st order) approximation