Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
(2 intermediate revisions by the same user not shown)
Line 1,218: Line 1,218:
|-
|-
|<#RecentWindChill>
|<#RecentWindChill>
|Wind Chill
|Wind Chill (if temperature is below 10°C or 50 °F, then the new Feels Like now available in MX will report this same value).
| <#RecentWindChill d=48 m=1> reports the wind chill temperature 2 days ago
| <#RecentWindChill d=48 m=1> reports the wind chill temperature 2 days ago
|-
|-
Line 1,279: Line 1,279:
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago)
| d=n (where n runs 0 to 6) days ago; h=n (where n is any number of hours ago); m=n (where n is any number of minutes ago)
|}
|}


=== Other weather derivatives ===
=== Other weather derivatives ===
Line 1,302: Line 1,301:
==== Apparent Temperature and Feels Like ====
==== Apparent Temperature and Feels Like ====


Note this apparent temperature formula uses Celsius for temperature and metres per second for wind speed. You will need to do the appropriate conversions if you use different units.  The Australian Apparent temperature formula is same for Cumulus 1 and MX:
Note this apparent temperature formula uses Celsius for temperature and '''metres per second''' for wind speed. You will need to do the appropriate conversions from the quoted recent history tags if you use different units.  The Australian Apparent temperature formula is same for Cumulus 1 and MX:


var actualVaporPress = <#RecentHumidity h=3>/100) * 6.105 * Math.exp(17.27 * <#RecentOutsideTemp h=3>) / (237.7 + parseFloat(<#RecentOutsideTemp h=3>))));
var actualVaporPress = <#RecentHumidity h=3>/100) * 6.105 * Math.exp(17.27 * <#RecentOutsideTemp h=3>) / (237.7 + parseFloat(<#RecentOutsideTemp h=3>))));
var appTempDegC = parseFloat(<#RecentOutsideTemp h=3) + (0.33 * actualVaporPress) - (0.7 * <#RecentWindSpeed h=3>) - 4;
var appTempDegC = parseFloat(<#RecentOutsideTemp h=3) + (0.33 * actualVaporPress) - (0.7 * <#RecentWindSpeed h=3>) - 4;


Feels Like as implemented at version 3.6.10 (see [[#Feels_Like|Feels Like section below Current condition web tags]]) reports exactly same as wind chill for temperatures '''below''' 10°C or 50°F:
Feels Like as implemented at version 3.6.10 (see [[#Feels_Like|Feels Like section below Current condition web tags]]) uses Celsius for temperature and '''km per hour''' for wind speed. Again, you will need to do the appropriate conversions from the quoted recent history tags if you use different units.
<pre>if(wind_km_h < 4.828) WC = tempDegC;  
 
Calculation from recent history tags is much more complicated because there are 3 different calculations: Feels Like reports exactly same as wind chill for temperatures '''below''' 10°C or 50°F so the WC here should equal <#RecentWindChill h=3>:
<pre>if(<#RecentWindSpeed h=3> < 4.828) WC = <#RecentOutsideTemp h=3>;  
else{
else{
wind_pow =  Math.pow(wind_km_h, 0.16);
wind_pow =  Math.pow(<#RecentWindSpeed h=3>, 0.16);
WC = (13.12 + 0.1625 * tempDegC) - (11.37 * wind_pow) + (0.3965 * tempDegC * wind_pow);// Brackets used to ensure "+" is interpreted as addition not concatenation
WC = (13.12 + 0.1625 * <#RecentOutsideTemp h=3>) - (11.37 * wind_pow) + (0.3965 * <#RecentOutsideTemp h=3> * wind_pow);// Brackets used to ensure "+" is interpreted as addition not concatenation
} </pre>
} </pre>


For temperatures '''above''' 20°C or 68°F it uses a different way to calculate apparent temperature that it uses at these higher temperatures (this formula only used for 3.6.10 onwards):
For temperatures '''above''' 20°C or 68°F Feels Like uses a different way to calculate apparent temperature that it uses at these higher temperatures (this formula only used for 3.6.10 onwards):
<pre>var actualVaporPress = (humVal/100) * 6.112* Math.exp((17.62*tempDegC)/(243.12 + tempDegC)) / 10.0;  // Not same as at build 3084
<pre>var actualVaporPress = <#RecentHumidity h=3>/100) * 6.112* Math.exp((17.62 * <#RecentOutsideTemp h=3>)/(243.12 + <#RecentOutsideTemp h=3>)) / 10.0;  // Not same as at build 3084
/* uses kilometres per hour for wind speed */
/* uses kilometres per hour for wind speed */
var wind_km_h = calcWind(windSpeedStr, windUnit, "km/h");
/*  What Cumulus MX will use to calculate apparent temperature for feels like is changed very slightly */
/*  What Cumulus MX will use to calculate apparent temperature for feels like is changed very slightly */
if(wind_km_h > 72) wind_km_h =72;
if(<#RecentWindSpeed h=3> > 72) <#RecentWindSpeed h=3> =72;
AT= (1.04 * tempDegC) + (2 * actualVaporPress) - (0.1805553 * wind_km_h) - 2.7;</pre>
AT= (1.04 * <#RecentOutsideTemp h=3>) + (2 * actualVaporPress) - (0.1805553 * <#RecentWindSpeed h=3>) - 2.7;</pre>


For in-between temperatures it uses a more complicated merge of the two formulas for AT and WC as defined above:
For in-between temperatures it uses a more complicated merge of the two formulas for AT and WC as defined above:
<pre>app_temp_mult = ( tempDegC - 10) / 10;
<pre>app_temp_mult = (<#RecentOutsideTemp h=3> - 10) / 10;
wind_chill_mult = 1 - app_temp_mult;
wind_chill_mult = 1 - app_temp_mult;


5,838

edits

Navigation menu