Page 25 of 54

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 20 Apr 2011 9:27 pm
by mike
Ray
Sorry about that.

CloudBase PHP Script v3.05 uploaded to a test dir http://au-prospecting.com/weather/test/ ... e-test.php

Only using the realtime text.

19/04/11 19:54:16 38.5 87 34.9 0.0 0.0 0 0.00 0.31 29.99 --- 0 mph F in in 12.9 0.00 2.65 2.65 0.26 79.7 41 38.5 -0.1 41.5 00:00 35.8 08:54 7.4 06:46 7.4 06:46 30.11 10:03 29.96 00:00 1.9.1 989 0.0 38.5 38.5 0 0 0 0 0.02 -26 1 0 --- 802 ft 35.4 0.0 0 0

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 21 Apr 2011 1:37 am
by mike
Manuel
I changed this part of the code $LastRainDate = date($ShortdateFormat,strtotime($LastRainTip[0]));
to
$LastRainDate = date('m-d-Y', strtotime($LastRainTip[0]));

and got this

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 21 Apr 2011 2:11 am
by actioman
mike wrote:Manuel
I changed this part of the code $LastRainDate = date($ShortdateFormat,strtotime($LastRainTip[0]));
to
$LastRainDate = date('m-d-Y', strtotime($LastRainTip[0]));

and got this
And it works perfectly!

Thank you very much Mike!

And congratulations. You have a really good website! ;)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 21 Apr 2011 4:30 am
by gemini06720
steve wrote:Cumulus uses the algorithm from the 'Zambretti Forecaster', and hence those are the descriptions from the Zambretti Forecaster, and are in the form of English prevalent at the time. If you don't like the phrases, you can use whatever you want instead.
Steve I know all that... The terms used in the 'Zambretti Forecaster' (designed by Negretti and Zambra) to defined the weather information might have been appropriate in 1915 when the 'calculator' was first introduced but the weather terms have changed greatly since then.

It is not up to me to change the terms - it is up to you - after all you are the one designer using those extremely old weather terms in an incredibly modern weather software - I am just using the terms because they are there and I need to keep some kind of continuity between my script and your software... :|

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 21 Apr 2011 7:20 am
by steve
gemini06720 wrote:It is not up to me to change the terms - it is up to you - after all you are the one designer using those extremely old weather terms in an incredibly modern weather software - I am just using the terms because they are there and I need to keep some kind of continuity between my script and your software... :|
I am using the terms because Cumulus is emulating a Zambretti forecaster. I also provide a facility for users to change the terms to their liking, e.g. to translate them into another language, or even to change the English wording if they wish. So there is no 'continuity' at all, as everyone may have different settings.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 21 Apr 2011 10:52 am
by gemini06720
OK, one quick reply for the time being ... I am 'deeply' involved with the 'cloudbase' script and I need to return to it as quickly as possible while I still remember my solutions to the problems... :mrgreen:
mike wrote:Only using the realtime text.
Mike and the others... The 'cloudbase' script was originally design by Rainer Finkeldeh (of bashewa.com | South Africa) for Weather Display. About a year and a half ago, I modified to script to use the weather information provided by Cumulus and my version of Cumulus produces its data in metric. So, the script was entirely adapted to be used with metric - there were some functions to convert from imperial to metric when needed. But, I have never used nor tested the script with imperial data. :oops:

That is until now. :( Since I got my first weather station (about 6-7 years ago), I have never used the imperial system of measure with any weather software.

Mike, I have downloaded a copy of your 'realtime.txt' data file ... well the values contained within the file (I do not need a real time data file). Over the past hours, I have been using that data file to rewrite quite a few line of code to accept imperial values as the default system of measure... Once I am satisfied with that, I will have to test the code with metric values as the default system of measure... :roll:

Oh well, I guess I will be busy this Thursday... :twisted:

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sat 23 Apr 2011 11:11 pm
by gemini06720
OK, if there is still someone 'lurking' into this forum... :mrgreen:

I need some assistance... :|

As I expressed in a previous message, the forecast phrases/terms produced by Cumulus are somewhat very outdated (circa 1915) and not very representative (in an easy to understand language) of what the weather is really like outside... :roll:

So, I need to assistance to 'translate' the following phrases/terms into 'simple' english phrases/terms that really represent what the weather forecast is.

Here are the phrases/terms to be 'translated':

Code: Select all

 0:  $curcond = 'Not available';
 1:  $curcond = 'Settled fine';
 2:  $curcond = 'Fine weather';
 3:  $curcond = 'Becoming fine';
 4:  $curcond = 'Fine,becoming less settled';
 5:  $curcond = 'Fine,possible showers';
 6:  $curcond = 'Fairly fine,improving';
 7:  $curcond = 'Fairly fine,possible showers early';
 8:  $curcond = 'Fairly fine,showery later';
 9:  $curcond = 'Showery early,improving';
10:  $curcond = 'Changeable,mending';
11:  $curcond = 'Fairly fine,showers likely';
12:  $curcond = 'Rather unsettled clearing later';
13:  $curcond = 'Unsettled,probably improving';
14:  $curcond = 'Showery,bright intervals';
15:  $curcond = 'Showery,becoming less settled';
16:  $curcond = 'Changeable,some precipitation';
17:  $curcond = 'Unsettled,short fine intervals';
18:  $curcond = 'Unsettled,precipitation later';
19:  $curcond = 'Unsettled,some precipitation';
20:  $curcond = 'Mostly very unsettled';
21:  $curcond = 'Occasional precipitation,worsening';
22:  $curcond = 'Precipitation at times,very unsettled';
23:  $curcond = 'Precipitation at frequent intervals';
24:  $curcond = 'Precipitation,very unsettled';
25:  $curcond = 'Stormy,may improve';
26:  $curcond = 'Stormy,much precipitation';
The phrases/terms must fit within eleven (11) possible categories:

Code: Select all

$sunny
$partlycloudy
$scattered
$mostlycloudy
$overcast
$thunderclouds
$drizzle
$raining
$snowing
$misty
$rainstopped
Categories can contain more than one condition ('$curcond') and categories can be empty.

Here is what I have done so far (but, at times, the forecasts are way off):

Code: Select all

$sunny
  1: // Settled fine
  2: // Fine weather

$partlycloudy
  3: // Becoming fine
  4: // Fine,becoming less settled
  10: // Changeable, mending

$scattered
  5: // Fine,possible showers
  7: // Fairly fine,possible showers early
  8: // Fairly fine,showery later
  9: // Showery early,improving
 11: // Fairly fine,showers likely
 14: // Showery,bright intervals

$mostlycloudy
  6: // Fairly fine,improving
 12: // Rather unsettled clearing later
 13: // Unsettled,probably improving
 17: // Unsettled,short fine intervals

$overcast
 15: // Showery,becoming less settled
 16: // Changeable,some precipitation
 18: // Unsettled,precipitation later
 19: // Unsettled,some precipitation
 20: // Mostly very unsettled

$thunderclouds
 26: // Stormy,much precipitation

$drizzle
    //case 15: // Showery,becoming less settled // moved to $overcast

$raining
 21: // Occasional precipitation,worsening
 22: // Precipitation at times,very unsettled
 23: // Precipitation at frequent intervals
 24: // Precipitation,very unsettled
 25: // Stormy,may improve

$snowing
  nothing

$misty
  nothing
Assistance would be greatly appreciated.

As for the 'cloudbase' script ... I have made a large number of changes and those changes are causing me some troubles. I will have to rethink my modifications and streamline the code so the processing of the cloud height is all in metric while accepting input data in either metric or imperial and producing output data in either metric or imperial... :evil:

I have also added the 'cloudbase' script into the 'ajax-dashboard.php' script and partially into the 'ajaxCUwx.js' script... 8-)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sun 24 Apr 2011 3:07 am
by mike
I did a few code changes to the cloud script and got it working. Not sure metric is working now :twisted:
I added a few things to my dash board. Still lots of more work to do.
My cumulus forecast today was Exceptional Weather, Stormy, much precipitation and it was right.
We had heavy rain,wind and a little snow all in one day :shock:

Re: Now available: AJAX/PHP multilingual website templates

Posted: Sun 24 Apr 2011 11:38 pm
by beteljuice
So, I need to assistance to 'translate' the following phrases/terms into 'simple' english phrases/terms that really represent what the weather forecast is.
What you really mean is you want to equate the forecast to sky conditions for the 'icons'.

I believe this was done for the Cumulus Gadget by Ib https://cumulus.hosiene.co.uk/viewtopic.p ... lit=gadget

Although I don't know how sucessful the reasoning is, everyone that used it seems happy enough.

BTW. The conditions -1 (exceptionally fine) and -26 (exceptionally bad) are missing.

In an experiment I did several years ago (DHTML / JavaScript) which created a very similar weather 'pictogram' (but with animated windsock and thunderstorm ;) ) I limited sky to clear, some cloud, some cloud with rain, overcast, heavy rain (overlayed on day / night graphic) - but I used pressure trend to overlay a thumbs up or thumbs down next to a one or two word discription to indicate improving / worsening. Seemed to work very well. Old Experiment

Re: Now available: AJAX/PHP multilingual website templates

Posted: Tue 26 Apr 2011 10:05 pm
by beteljuice
These were the 'overlay' arrays I decided.

NB. This was using the o/p direct from the Zambretti algorithm (before Cumulus made <#forecastnumber> available.)
So ADD -1 (exceptional fine), 0 - Not Available, renumber 0=>25 as 1=>26, ADD -26 (exceptional bad)

Remember these were overlays, day / night background and windsock decisions made elswhere.

Code: Select all

var condition_img = new Array();
var condition_txt = new Array();

// Settled fine - 'default' zambretti text - array(number)([0]
condition_img[0] = "";	// my default pic is clear / fine
condition_txt[0] = "";
// Fine weather
condition_img[1] = "";	// my default pic is clear / fine
condition_txt[1] = "";
// Becoming fine
condition_img[2] = "stuff/beteljuice_cloud.png";
condition_txt[2] = "Change <img src =\"stuff/thumb_up.gif\" />";
// Fine, becoming less settled
condition_img[3] = "stuff/beteljuice_cloud.png";
condition_txt[3] = "Change <img src =\"stuff/thumb_down.gif\" />";
// Fine, possible showers
condition_img[4] = "stuff/beteljuice_shower.gif";
condition_txt[4] = "Showers";
// Fairly fine, improving
condition_img[5] = "stuff/beteljuice_cloud.png";
condition_txt[5] = "Change <img src =\"stuff/thumb_up.gif\" />";
// Fairly fine, possible showers early
condition_img[6] = "stuff/beteljuice_shower.gif";
condition_txt[6] = "Showers <img src =\"stuff/thumb_up.gif\" />";
// Fairly fine, showery later
condition_img[7] = "stuff/beteljuice_shower.gif";
condition_txt[7] = "Showers <img src =\"stuff/thumb_down.gif\" />";
// Showery early, improving
condition_img[8] = "stuff/beteljuice_shower.gif";
condition_txt[8] = "Showers <img src =\"stuff/thumb_up.gif\" />";
// Changeable, mending
condition_img[9] = "stuff/beteljuice_cloud.png";
condition_txt[9] = "Change <img src =\"stuff/thumb_up.gif\" />";
// Fairly fine, showers likely
condition_img[10] = "stuff/beteljuice_shower.gif";
condition_txt[10] = "Showers";
// Rather unsettled clearing later
condition_img[11] = "stuff/beteljuice_cloud.png";
condition_txt[11] = "Change <img src =\"stuff/thumb_up.gif\" />";
// Unsettled, probably improving
condition_img[12] = "stuff/beteljuice_cloud.png";
condition_txt[12] = "Change";
// Showery, bright intervals
condition_img[13] = "stuff/beteljuice_shower.gif";
condition_txt[13] = "Showers";
// Showery, becoming less settled
condition_img[14] = "stuff/beteljuice_shower.gif";
condition_txt[14] = "Showers <img src =\"stuff/thumb_down.gif\" />";
// Changeable, some rain
condition_img[15] = "stuff/beteljuice_rainy.gif";
condition_txt[15] = "Change";
// Unsettled, short fine intervals
condition_img[16] = "stuff/beteljuice_cloud.png";
condition_txt[16] = "Change";
// Unsettled, rain later
condition_img[17] = "stuff/beteljuice_rainy.gif";
condition_txt[17] = "Change <img src =\"stuff/thumb_down.gif\" />";
// Unsettled, some rain
condition_img[18] = "stuff/beteljuice_rainy.gif";
condition_txt[18] = "Rainy";
// Mostly very unsettled
condition_img[19] = "stuff/beteljuice_shower.gif";
condition_txt[19] = "Unsettled";
// Occasional rain, worsening
condition_img[20] = "stuff/beteljuice_rainy.gif";
condition_txt[20] = "Change <img src =\"stuff/thumb_down.gif\" />";
// Rain at times, very unsettled
condition_img[21] = "stuff/beteljuice_rainy.gif";
condition_txt[21] = "Unsettled";
// Rain at frequent intervals
condition_img[22] = "stuff/beteljuice_rainy.gif";
condition_txt[22] = "Rainy";
// Rain, very unsettled
condition_img[23] = "stuff/beteljuice_rainy.gif";
condition_txt[23] = "Unsettled";
// Stormy, may improve
condition_img[24] = "stuff/beteljuice_storm2.gif";
condition_txt[24] = "STORM ALERT";
// Stormy, much rain
condition_img[25] = "stuff/beteljuice_storm2.gif";
condition_txt[25] = "STORM ALERT";


Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 27 Apr 2011 1:00 pm
by gemini06720
So, I need to assistance to 'translate' the following phrases/terms into 'simple' english phrases/terms that really represent what the weather forecast is.
beteljuice wrote:What you really mean is you want to equate the forecast to sky conditions for the 'icons'.
No, not at all. For the work I was doing, I did not use icons.
I wanted to understand the relationship between the terms used by the antique 'Zambretti Forecaster' (by Negretti and Zambra, circa 1915) and terms used now-a-day for the forecast.
What I needed to do was to associate all those terms with 11 possible categories.

To give me an idea how some other people had done it, I had looked at the code used for both the 'Weather Console' (daj) and the 'Cumulus Realtime Gadget' (dane) - that help somewhat, but I was still not sure.
beteljuice wrote:Although I don't know how sucessful the reasoning is, everyone that used it seems happy enough.
It might just be an illusion (that people are happy enough) - most people would not complaint - and what other choices are available?
beteljuice wrote:BTW. The conditions -1 (exceptionally fine) and -26 (exceptionally bad) are missing.
Thanks for the information - the 2 additional conditions have been added.

Thank you for the 'overlay' arrays you have posted - I have saved the information for reference.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 27 Apr 2011 1:10 pm
by gemini06720
The 'cloudbase' script... :roll:

Well, it has taken me a bit more time than I expected... :( The conversions and modifications are (I hope) all completed completed. The internal operations of the script (wherever calculations are madeneeded) are all (standardised) metric. The script can accept inputs (through the data files it reads, such as 'realtime.txt') in both metric and imperial data values. The script can produce output in either metric or imperial data display. I still need to do some additional tests with imperial data (mostly for input). I also have to test with Weather Display data.

If I do not encounter new 'major' problems, a new version of the script should be released by the end of the week.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 27 Apr 2011 6:39 pm
by actioman
gemini06720 wrote:The 'cloudbase' script... :roll:

Well, it has taken me a bit more time than I expected... :( The conversions and modifications are (I hope) all completed completed. The internal operations of the script (wherever calculations are madeneeded) are all (standardised) metric. The script can accept inputs (through the data files it reads, such as 'realtime.txt') in both metric and imperial data values. The script can produce output in either metric or imperial data display. I still need to do some additional tests with imperial data (mostly for input). I also have to test with Weather Display data.

If I do not encounter new 'major' problems, a new version of the script should be released by the end of the week.
Hello Ray! How is the cold? 8-)

You make things calmly, wait the time it takes. ;)

I'm sorry for not being able to help more at this point, but I do not know enough English.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 28 Apr 2011 4:30 am
by gemini06720
actioman wrote:How is the cold? 8-)
Manuel, the cold is almost completely gone ... finally. 8-)
actioman wrote:You make things calmly, wait the time it takes. ;)
I always make things calmly - I always deal very calmly with my computer and the script it runs... :D

It is when dealing with people, some people, that I loose my calm... :evil:
actioman wrote:I'm sorry for not being able to help more at this point, but I do not know enough English.
English is not the only requirement, a certain knowledge of PHP is also very important... :mrgreen:

I should be doing some additional tests with the 'cloudbase' script later on - as I indicated in a previous message, I have to ensure that the script will accept imperial data as produced by Cumulus and I do not want to change the way my Cumulus is producing its metric data. I also need to do further testing with Weather Display.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Mon 16 May 2011 11:12 pm
by actioman
Hello!

And news, there is still nothing?

This has been stopped...

Ray, and your tests with the cloud base scripts? ;)