Feels Like: Difference between revisions

m
If you understand PHP Hypertext Preprocessor language (other languages use similar operators) you will see from this that for MX, the '''feels like''' scale follows [[Wind chill|wind chill]] below 10 degrees Celsius, it follows [[Apparent temperature|apparent temperature]] above 20 degrees C, and blends the proportion of each of those at in-between temperatures.
 
The following JavaScript function will work out the feels like temperature taking as input in first parameter the current air temperature (that can be in <sup>o</sup>F or <sup>o</sup>C), the C or F is supplied in second parameter, the third parameter is the current average wind speed, the fourth parameter is the wind units (as expressed in &lt;#windunit&gt;), and the final parameter is the current humidity (as a %). I say current, but this function can be applied to past values as stored in standard data log. Within the function it calls other functions for calculating apparent tempewrature (AT) and wind chill (WC) and for converting temperature to Celsius (calcTempC) and converting output back to units used by Cumulus user, with rounding (calcTempR).
The following function
<pre>function calcFeelsLike(temp, tempLetter, wind, windUnit, RHumidity)
{
return feelsLike;
}</pre>
 
== Rest of this article ==
 
The rest of this article was written for versions of Cumulus that did not report '''JAG/TI feels like''', and uses JavaScript for deciding whether to display Heat Index, Apparent Temperature, or Wind Chill, based on the current weather conditions. It was designed to work with standard Cumulus web templates that produce HTML and do not use PHP.
5,838

edits