Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
(14 intermediate revisions by the same user not shown)
Line 841: Line 841:
|-
|-
|<#feelslike>
|<#feelslike>
|The current [[Feels_Like|Feels Like]] temperature.  The referenced page in weather terminology section of this Wiki explains it. Although output from version 3.5.4 build 3075, the correct value is only available from version 3.6.10 (build 3086) onwards as incorrect formula used in builds 3084 and 3085, and a different formula used in builds from 3075 to 3083.
|Not available in Cumulus 1. Not available in all MX versions. Please see sub-section below this table regarding availability by MX versions if you are using a MX version earlier than 3.6.10.
 
The current [[Feels_Like|Feels Like]] temperature.  The referenced page in weather terminology section of this Wiki explains it.
|-
|-
|<#IsFreezing>
|<#IsFreezing>
Line 1,028: Line 1,030:
|The same as <#currcond> but also has all characters above (decimal base) code 159 encoded as HTML entities for example this would encode any use of symbol for degree.
|The same as <#currcond> but also has all characters above (decimal base) code 159 encoded as HTML entities for example this would encode any use of symbol for degree.
|}
|}
==== Feels Like ====
The figures quoted for this derivative vary between versions:
* The first formula was used from MX version 3.5.4 (25 Apr 2020) build 3075 until version 3.6.7 (4 June 2020) build 3083
* The second formula, which was coded incorrectly, and so gave strange results, applied in versions 3.6.8 to 3.6.9 (build 3084, 3085)
* The third, and hopefully final, formula applies from version 3.6.10 (build 3086).
A php script for adding feels like as calculated in version 3.6.10 to any standard log line created either without feels like, or with an older calculation, can be downloaded from [https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=18096 Create Missing topic on support forum]


==Extra Sensors Davis (and a few others)==
==Extra Sensors Davis (and a few others)==
Line 1,208: 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,269: 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,290: Line 1,299:
H = (5/9 * (<#RecentHumidity h=3> /100 * svp - 10)) + <#RecentOutsideTemp h=3;
H = (5/9 * (<#RecentHumidity h=3> /100 * svp - 10)) + <#RecentOutsideTemp h=3;


==== Apparent Temperature ====
==== Apparent Temperature and Feels Like ====


Note this 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.  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 ====
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.
 
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{
wind_pow =  Math.pow(<#RecentWindSpeed h=3>, 0.16);
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>
 
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 = <#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 */
/*  What Cumulus MX will use to calculate apparent temperature for feels like is changed very slightly */
if(<#RecentWindSpeed h=3> > 72) <#RecentWindSpeed h=3> =72;
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:
<pre>app_temp_mult = (<#RecentOutsideTemp h=3> - 10) / 10;
wind_chill_mult = 1 - app_temp_mult;


Formula deleted, as only used from MX version 3.5.4 (25 Apr 2020) build 3075 until version 3.6.7 (4 June 2020) build 3083
FL= AT * app_temp_mult + WC * wind_chill_mult;</pre>


==Today==
==Today==
Line 1,341: Line 1,368:
|-
|-
|<#feelslikeTH>
|<#feelslikeTH>
|[[File:Badge vMx.png]] Available from version 3.6.0 Today's high feels like temperature
|[[File:Badge vMx.png]] Available from version 3.6.10 Today's high feels like temperature
|<#TfeelslikeH>
|<#TfeelslikeTH>
|-
|-
|<#feelslikeL>
|<#feelslikeTL>
|[[File:Badge vMx.png]] Available from version 3.6.0 Today's low feels like temperature
|[[File:Badge vMx.png]] Available from version 3.6.10 Today's low feels like temperature
|<#TfeelslikeL>
|<#TfeelslikeTL>
|-
|-
|<#heatindexTH>
|<#heatindexTH>
Line 2,039: Line 2,066:
|-
|-
|<#wchillH>
|<#wchillH>
|All time greatest wind chill (i.e. lowest temperature)  
|All time greatest wind chill (i.e. lowest temperature, but highest wind speed)  
|<#TwchillH>
|<#TwchillH>
|-
|-
Line 2,095: Line 2,122:
==Monthly All Time Records==
==Monthly All Time Records==


There are a set of tags for monthly all-time highs and lows, in other words the highest and lowest values for a particular month of the year. For example, the highest ever temperature in July. Each Value tag has an optional input parameter "mon=N" where N is the index of the month of the year that you want the value for (January=1 and so on). For example, <#ByMonthTempH mon=7> will give you the highest ever temperature in July.  The corresponding date/time web tags are formatted like the all time records directly above this section.
There are a set of tags for monthly all-time highs and lows, in other words the highest and lowest values for a particular month of the year. To supply both optional input, and optional output parameters, separate them with spaces, e.g. <#ByMonthTempHT mon=7 format=hh:nn>. In that example,  the highest ever temperature in July is returned in the value after processing by Cumulus.


If you don't supply a parameter (or supply an invalid value) the current month will be used. You can customise the date and time formats using the 'format' parameter on the web tag. To supply both input and output parameters, separate them with spaces, e.g. <#ByMonthTempHT mon=7 format=hh:nn>
Each Monthly All Time Records web tag has an optional input parameter "mon=N" where N is the index of the month of the year that you want the value for (January=1 and so on).  The corresponding date/time web tags are formatted like the all time records directly above this section. You can customise the date and time formats using the output  'format' parameter on the web tag.
 
If you don't supply an input parameter (or supply an invalid value like zero) the current month will be used. This is useful if you want to write a template that will always supply values for the current month and don't want to use a script to enter the correct input parameter by processing with that script before Cumulus processes the template.




Line 2,103: Line 2,132:
|-
|-
!style="width:150px"|Web tag_name
!style="width:150px"|Web tag_name
!style="width:300px"|Function
!style="width:400px"|Function
!style="width:150px"|Date/Time
!style="width:150px"|Date/Time
|-
|-
Line 2,121: Line 2,150:
|-
|-
|<#ByMonthWChillL>
|<#ByMonthWChillL>
|Greatest wind chill (i.e. lowest temperature)
|Greatest wind chill (i.e. lowest temperature and highest wind speed)
|<#ByMonthWChillLT>
|<#ByMonthWChillLT>
|-
|-
Line 2,228: Line 2,257:
|-
|-
!style="width:150px" | Web tag_name
!style="width:150px" | Web tag_name
!style="width:600px" | Function
!style="width:900px" | Function
|-
|-
|<#sunrise>
|<#sunrise>
5,838

edits

Navigation menu