Realtime.txt: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
387 bytes removed ,  5 October 2011
Updated recreating file with webtags for the new tags available in v1.9.2
(Updated recreating file with webtags for the new tags available in v1.9.2)
| 6
| wind speed ([http://en.wikipedia.org/wiki/Beaufort_scale beaufort])
| <#beaufortnumber>
| &lt;#beaufort&gt;
|-
| 14
| C
| temperature units - degree C, degree F
| <#tempunitnodeg>
| &lt;#tempunit&gt;
|-
| 16
| 2040
| Cloud base
| <#cloudbasevalue>
| &lt;#cloudbase&gt; (value and units combined)
|-
| 54
| ft
| Cloud base units
| <#cloudbaseunit>
| &lt;#cloudbase&gt; (value and units combined)
|-
| 55
This can be achieved by creating a template file using the webtags below, and referencing this in the Cumulus Configuration|Internet|Files dialog. Ticking the 'Process?' checkbox, and supplying a remote filename will create this copy of the realtime.txt file.
 
*Note also that the built-in realtime.txt always uses a 'dot' decimal character (as so is JavaScript/PHP 'safe'), the web tag version will use your host computers localisation for decimals. [There are some #RCxxx webtags available but they do not cover all the required values]
Note that there are currently two or three small differences between the built-in realtime.txt and this version. With this version:
 
*The Beaufort wind speed will have a 'F' prefix (eg F2) which is omitted in the built-in version.
*The temperature unit is prefixed with the string '&amp;deg;' which is omitted in the built-in version.
*Note also that the built-in realtime.txt always uses a 'dot' decimal character (as so is JavaScript/PHP 'safe'), the web tag version will use your host computers localisation for decimals. [There are some #RCxxx webtags available but they do not cover all the required values]
To ensure decimal compatibility across systems use a js construct such as:
 
var temp = +r[2].replace(',','.');
 
when referring to decimal values in the constructed file.
 
''(this is one complete line, although it may appear on this page as two or more due to screen width restrictions)''
 
<tt>&lt;#date format=dd/mm/yy&gt; &lt;#timehhmmss&gt; &lt;#temp&gt; &lt;#hum&gt; &lt;#dew&gt; &lt;#wspeed&gt; &lt;#wlatest&gt; &lt;#bearing&gt; &lt;#rrate&gt; &lt;#rfall&gt; &lt;#press&gt; &lt;#currentwdir&gt; &lt;<#beaufort&gt;beaufortnumber> &lt;#windunit&gt; &lt;<#tempunit&gt;tempunitnodeg> &lt;#pressunit&gt; &lt;#rainunit&gt; &lt;#windrun&gt; &lt;#presstrendval&gt; &lt;#rmonth&gt; &lt;#ryear&gt; &lt;#rfallY&gt; &lt;#intemp&gt; &lt;#inhum&gt; &lt;#wchill&gt; &lt;#temptrend&gt; &lt;#tempTH&gt; &lt;#TtempTH&gt; &lt;#tempTL&gt; &lt;#TtempTL&gt; &lt;#windTM&gt; &lt;#TwindTM&gt; &lt;#wgustTM&gt; &lt;#TwgustTM&gt; &lt;#pressTH&gt; &lt;#TpressTH&gt; &lt;#pressTL&gt; &lt;#TpressTL&gt; &lt;#version&gt; &lt;#build&gt; &lt;#wgust&gt; &lt;#heatindex&gt; &lt;#humidex&gt; &lt;#UV&gt; &lt;#ET&gt; &lt;#SolarRad&gt; &lt;#avgbearing&gt; &lt;#rhour&gt; &lt;#forecastnumber&gt; &lt;#isdaylight&gt; &lt;#SensorContactLost&gt; &lt;#wdir&gt; &lt;<#cloudbase&gt;cloudbasevalue> <#cloudbaseunit> &lt;#apptemp&gt; &lt;#SunshineHours&gt; &lt;#CurrentSolarMax&gt; &lt;#IsSunny&gt;</tt>
 
[[Category:Log_Files]]

Navigation menu