Windchill Calculation
Brought to you by:
iridium
From: David K. <da...@kj...> - 2002-03-24 15:16:40
|
Just a note of praise for the PHP Weather....great program. Thanks to the entire team for a very useful program. Below is a modification I made to the .inc program to calulate windchill in both F and C. I placed this code right after the relative humidity calc in the process metar function. I also modified the locale-en.inc to print a "The windchill is..." statement in the full pretty print. Note the condition that temperature be below 40f and wind above 3 mph for the calculation to be valid. These conditions are a combination of the F and C version requirements. Also, these equation are the "new" windchill formula released about Nov 2001. I hope you guys consider this little addition. /* * Compute windchill if temp < 40f and windspeed > 3 mph */ if ($decoded_metar['temp_f'] <= '40' && $decoded_metar['wind_miles_per_hour'] > '3'){ $decoded_metar['windchill_f'] = number_format(35.74 + 0.6215*$decoded_metar['temp_f'] - 35.75*pow($decoded_metar['wind_miles_per_hour'],0.16) + 0.4275*$decoded_metar['temp_f']*pow($decoded_metar['wind_miles_per_hour'],0.16)); $decoded_metar['windchill_c'] = number_format(13.112 + 0.6215*$decoded_metar['temp_c'] - 13.37*pow(($decoded_metar['wind_miles_per_hour']/1.609),0.16) + 0.3965*$decoded_metar['temp_c']*pow(($decoded_metar['wind_miles_per_hour']/1.609),0.16)); } |