Realtime.txt: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
<br> <tt>18/10/08 16:03:45 8.4 84 5.8 24.2 33.0 261 0.0 1.0 999.7 W 6 mph C mb mm 146.6 +0.1 85.2 588.4 11.6 20.3 57 3.6 -0.7 10.9 12:00 7.8 14:41 37.4 14:38 44.0 14:28 999.8 16:01 998.4 12:06 1.8.2 448 36.0 10.3 10.5 13 0.2 14 260 2.3 3 1 1 NNW 2040 ft 12.3 11.1 420.1 1</tt>
 
= Recreating the file using webtags =
 
Occasionally there is a requirement from some users to create a copy of the realtime.txt file and have it posted to a location at the normal Cumulus web update interval rather than the realtime interval.
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 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 rt = realtime.split(" ");
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)''

Navigation menu