Page 2 of 4

Re: realtime.txt

Posted: Sun 19 Oct 2008 11:42 am
by steve
pinto wrote:Only an idea: can Steve add the buildnumber to the realtime.txt
Yes, good idea. I decided to make the build number more visible (it's in About... now) as I intend to continue with this process of having beta releases with the same version number but different build numbers.

Re: realtime.txt

Posted: Sun 19 Oct 2008 7:58 pm
by steve
I've just uploaded a new build (459) which fixes the decimal points and adds a 40th item, the build number.

Re: realtime.txt

Posted: Sun 19 Oct 2008 8:14 pm
by pinto
tks. looks O.K. :D

even in the banner

Re: realtime.txt

Posted: Sun 19 Oct 2008 10:47 pm
by dane
Pinto,
your banner seems to be way ahead of Kevin's banner.php V2.
Would you care to share it with us :?:

Re: realtime.txt

Posted: Mon 20 Oct 2008 12:03 am
by TNETWeather
I was waiting to see if there were going to be more changes as I need to update the documentation each time as well. I had just about finished when the build number was added.

The version 3.0 packages for banner and avatar are now available for download. The new graphs are still having the core modules worked on but will most likely be available later tonight as well.

Re: realtime.txt

Posted: Mon 20 Oct 2008 6:29 am
by pinto
dane wrote:Pinto,
your banner seems to be way ahead of Kevin's banner.php V2.
Would you care to share it with us :?:
It is exactly the banner from Kevin.
I only changed the fonts to comicbd.ttf
and added the buildnumber to it

EDIT:V3.0 now

you can see the code here

Re: realtime.txt

Posted: Fri 24 Oct 2008 8:06 pm
by pinto
Hi Steve,
Trying to build a near-realtime updating index page, is it possible to add

<#heatindex>
<#beaudesc>
<#windrununit>
<#presstrend>

to the end of the realtime.txt

(index page is partly working, not finished yet)

Re: realtime.txt

Posted: Fri 24 Oct 2008 8:13 pm
by steve
No problem - I need to add 'recent high gust' as well (the 'gust' that's there now is just the latest reading).

Re: realtime.txt

Posted: Fri 24 Oct 2008 8:59 pm
by TNETWeather
pinto wrote:Hi Steve,
Trying to build a near-realtime updating index page, is it possible to add

<#heatindex>
<#beaudesc>
<#windrununit>
<#presstrend>

to the end of the realtime.txt

(index page is partly working, not finished yet)
From my point of view... I would be hesitant of adding redundant data to this file since almost all uses of the file is going to be via a script or some sort of program.

The smaller the better and the less changes the better.

heatindex makes sense because it cannot be easily derived from other data... for that matter humidex would be nice as well (Common in Canada and becoming common in the US).

The rest are easily obtained from the data already contained in the realtime.txt file. That is why I didn't include them in the original request as they can be obtained from the data provided.

Oh... When I first recommended additional values, I couldn't think of a reason why windrununit to be different from windunit which is why I dropped it from the list.

presstrend can be derived from the existing data provided in pressure trend value. If it is positive (actually has a + in it it is Rising, if it is a negative value (will have a -) it is Falling..

Code: Select all

#	19     +0.1       pressure trend value
So in a script you could do something like:

Code: Select all

echo "Trend = ";
( substr( $DATA[18],0,1 ) == "-" ) ? print "Falling" : print "Rising";
echo "<br/>";
Similarly, the file already has the beaufortdesc value:

Code: Select all

#	13     6          wind speed (beaufort)
Beaufort values are fixed, they don't change... they are made up of a set of force values that are easily computed from existing data using a simple array.

Code: Select all

$beufortdesc = array("Calm","Light Air","Light Breeze","Gentle Breeze",
        "Moderate Breeze", "Fresh Breeze", "Strong Breeze", "Near Gale",
        "Gale", "Strong Gale", "Storm", "Violent Storm","Hurricane");
So that in a script, you could do...

Code: Select all

echo "Beaufort" . $DATA[12] . ' = ' . $beufortdesc[$DATA[12]] . "<br/>";
The power of the data in the realtime.txt file is that all the values are now known values so that if you want to display the other format, you can easily by checking to see what format is being used.

So if you were a metric station and you wanted display Fahrenheit for example, you can easily with:

Code: Select all

echo "Temp " . $DATA[2] . " " . $DATA[14] . " (" ;
if ( $DATA[14] == "C" ) ? print CoF($DATA[2],1) : print FtoC($DATA[2],1);
if ( $DATA[14] == "C" ) ? print "F)" : print "C)";
echo "<br/>";
Just an opinion of course...

Re: realtime.txt

Posted: Fri 24 Oct 2008 9:10 pm
by steve
Seems reasonable to me. I have to admit that I didn't look too closely at what they were as I was starting to shut everything down because of the large electrical storm that had just arrived :)

The wind unit isn't quite the same as the wind run unit, but again, can be derived easily.

Re: realtime.txt

Posted: Fri 24 Oct 2008 9:10 pm
by pinto
Agree with Kevin, didn't think of calculating things myself :oops:

Only keep heatindex (and like he said maybe humidex if possible)

Re: realtime.txt

Posted: Fri 24 Oct 2008 9:23 pm
by steve
OK, I'll add heat index, humidex, and recent high gust.

Re: realtime.txt

Posted: Sat 25 Oct 2008 5:09 pm
by pinto
Thanks to Kevin's code samples I have my indexpage updated every 5 seconds now :D :D :D 8-)

Re: realtime.txt

Posted: Sun 26 Oct 2008 3:26 pm
by steve
I've added the following to the end of realtime.txt in the next beta, which I will be uploading shortly:

41 recent max gust
42 heat index
43 humidex

I think I've got the humidex calculation correct, but no doubt someone will tell me if not. I've also added a <#humidex> web tag, but I'm not displaying the value on the main display.

Re: realtime.txt

Posted: Sun 26 Oct 2008 4:46 pm
by TNETWeather
Just updated...

Humidex is most likely correct but is in the would expect it to be in the format of tempunit

6.3 75.2 19.9

I'm pretty sure that the 19.9 should have been 67.8

19.9°C = 67.8°F

**Update** just checked the heat index and Humidex against WD and they are within tenths of a degree the same.