Page 2 of 3

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 1:16 pm
by beteljuice
I should have worn the right goggles :oops:

However; The script is looking up KSJC (San Jose Int'l) METAR information.

... but that doesn't change the temp problem, which seems to be in the 'graphic' part of the code.

http://www.nightliferedditch.info/cloud ... m=M&html=1

You can also 'force' conditions by adding &test=1 (through to 5)

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 5:11 pm
by nitrx
beteljuice wrote:I should have worn the right goggles :oops:

However; The script is looking up KSJC (San Jose Int'l) METAR information.

... but that doesn't change the temp problem, which seems to be in the 'graphic' part of the code.

http://www.nightliferedditch.info/cloud ... m=M&html=1

You can also 'force' conditions by adding &test=1 (through to 5)
I can't locate the Metar but perhaps the GD2 library doesn't has the centigrade character ? Sant Jose California USA ??? huh, yes your right the metar is an example and not overwitten by the settings http://www.nightliferedditch.info/get-m ... p?sce=view

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 8:23 pm
by ergie
O.K guys :roll: between your conversation I understood only one thing. In my coudbase scrip I missing metar or something like that? I tried to do everything what’s written in manual. And yes I enter my station data in cloudbase php elevation, longitude, latitude.

Can someone show me where is misstakes? Or what I am missing. I am attaching my cloudbase php file
Thanks in advance,
Rim

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 8:44 pm
by nitrx
ergie wrote:O.K guys :roll: between your conversation I understood only one thing. In my coudbase scrip I missing metar or something like that? I tried to do everything what’s written in manual. And yes I enter my station data in cloudbase php elevation, longitude, latitude.

Can someone show me where is misstakes? Or what I am missing. I am attaching my cloudbase php file
Thanks in advance,
Rim
Hmmz I don't know exactly but do you have http://www.nightliferedditch.info/Settings-weather.php on your server ?

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 8:55 pm
by ergie
Hi,
yes there is file Settings-weather.php and I found that in this file was wrong metar info there was on line:
$SITE['conditionsMETAR'] = 'KSJC'; // set to nearby METAR for current conditions icon/text

Now I changed it in to EGBB it is Birmingam international airport ICAO.
I am attatching my setting weather txt.

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 8:57 pm
by nitrx
nitrx wrote:
ergie wrote:O.K guys :roll: between your conversation I understood only one thing. In my coudbase scrip I missing metar or something like that? I tried to do everything what’s written in manual. And yes I enter my station data in cloudbase php elevation, longitude, latitude.

Can someone show me where is misstakes? Or what I am missing. I am attaching my cloudbase php file
Thanks in advance,
Rim
Hmmz I don't know exactly but do you have http://www.nightliferedditch.info/Settings-weather.php on your server ?
Okay it seems the cloudbase script has a fixed METAR/ICAO number so it's not dependent from the settings.php I think your location is allright but I cant'figure out why the value of the temperature is broken you got the script from Ray so maybe he can figure it out ..

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 9:05 pm
by ergie
Yes I enter new metar information. I enter four letters in Settings-weather.php ( EGBB) and enter long metar info in cloudbase.php (EGBB 032020Z 03003KT 4400 -RA BR FEW004 BKN016 07/06 Q1010).
Yes I spotted that something wrong with Celsius in the bottom of coudbase picture from the beginning when I turn on it in the cloudbase.php file.
Any way thank you for your comments.
Have a good night.

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 9:11 pm
by nitrx
ergie wrote:Yes I enter new metar information. I enter four letters in Settings-weather.php ( EGBB) and enter long metar info in cloudbase.php (EGBB 032020Z 03003KT 4400 -RA BR FEW004 BKN016 07/06 Q1010).
Yes I spotted that something wrong with Celsius in the bottom of coudbase picture from the beginning when I turn on it in the cloudbase.php file.
Any way thank you for your comments.
Have a good night.
You dont have to put the whole code in it

Code: Select all

EGBB 032020Z 03003KT 4400 -RA BR FEW004 BKN016 07/06 Q1010
just EGBB is okay it works fine for my cloudbase script http://apeldoorn.tk/weer/cloudbase.php it's the same as yours , you or Ray only have to figure out the why the temperarure isn't displayed correct.

Goodnight too

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 9:16 pm
by ergie
Ok I will put only EGBB. And my cloudbase meter always show 180m. Always :)))) not moving up or down from the beginning I think.

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 10:59 pm
by beteljuice
Weather Software: Cumulus
Date/Time: Thursday, 03 May 2012 / 23:40 (nighttime)
Conditions: Drizzle, showers, showery, becoming less settled
Air Temperature: 6.6°C
Dew Point: 6.5°C
Cloud Temperature: 6.5°C
Humidity: 99%
Wind: Calm
Barometric Pressure: 1011 hPa
Calculated Cloud Base: 174.19 meters (ASL)
Cumulus Cloud Base: 18 m (AGL)
Station Elevation: 162 meters (531.5 feet)

Sunrise: 05:17
Sunset: 20:22
Time Zone: Europe/London => BST => UTC+1 hours
Background Image: cb-bg-00sprn.png
Moon Age: 12 days, 15 hours, 22 minutes
Server Time: 23:40:01
Your cloudbase IS changing, but you have the settings to show ASL - ie. your altitude plus Cumulus cloudbase, and because it's raining / high RH, you are IN the cloud. ;)

Code: Select all

#################################################################################
# BEGIN IMAGE DETAILS SETTINGS                                                  #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom         = false;  // always use the cloud base height reported by Cumulus
$useCUHeight      = false;  // override the default variables with those found in (CU) CUtags.php
Your setting (I think) are also saying that the (temp) should be to one decimal point; however even if the setting are changed to Imperial, or (null) default, the accented A character appears instead of the decimal part of the string.

It would seem that

Code: Select all

$txtT = round($curtemp).'°'.$uomTemp;
Is not giving the results expected.

One for the author (Ray) I think ....

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Thu 03 May 2012 11:25 pm
by ergie
beteljuice wrote:
Weather Software: Cumulus
Date/Time: Thursday, 03 May 2012 / 23:40 (nighttime)
Conditions: Drizzle, showers, showery, becoming less settled
Air Temperature: 6.6°C
Dew Point: 6.5°C
Cloud Temperature: 6.5°C
Humidity: 99%
Wind: Calm
Barometric Pressure: 1011 hPa
Calculated Cloud Base: 174.19 meters (ASL)
Cumulus Cloud Base: 18 m (AGL)
Station Elevation: 162 meters (531.5 feet)

Sunrise: 05:17
Sunset: 20:22
Time Zone: Europe/London => BST => UTC+1 hours
Background Image: cb-bg-00sprn.png
Moon Age: 12 days, 15 hours, 22 minutes
Server Time: 23:40:01
Your cloudbase IS changing, but you have the settings to show ASL - ie. your altitude plus Cumulus cloudbase, and because it's raining / high RH, you are IN the cloud. ;)

Code: Select all

#################################################################################
# BEGIN IMAGE DETAILS SETTINGS                                                  #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom         = false;  // always use the cloud base height reported by Cumulus
$useCUHeight      = false;  // override the default variables with those found in (CU) CUtags.php
Your setting (I think) are also saying that the (temp) should be to one decimal point; however even if the setting are changed to Imperial, or (null) default, the accented A character appears instead of the decimal part of the string.

It would seem that

Code: Select all

$txtT = round($curtemp).'°'.$uomTemp;
Is not giving the results expected.

One for the author (Ray) I think ....

I don't know if it's really working. I mean if works clouds height.
All evening I am playing with:

BEGIN IMAGE DETAILS SETTINGS #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php

and with

$getMetar = true; // get the METAR from NOAA for substituting cloud conditions at night and/or day (not required)
$metarRefresh = 1; // refresh rate of the METAR in minutes
$useMetarAtNight = true; // always use METAR at night time for determinig clouds
$onlyUseMetar = true; // always use METAR for determinig clouds

And when I set all these to false

$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php

Then it start show me 174m instead of 180m. ( but before all the time shows me 180) But if you move mouse on cloudbase picture then you can see that text pop up 180m ASL and this text never changes. Even on sunny day.
I spotted that in cumulus program my coudbase always shows 18m or sometimes 17m only.
In cumulus I set my altitude to 162m.
I live in clouds all the time :) :)

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Fri 04 May 2012 2:46 am
by gemini06720
OK, I have been busy working on some scripts ( more like adapting the scripts to my likings) ... so, I have been away from most forums.
nitrx wrote:Okay it seems the cloudbase script has a fixed METAR/ICAO number so it's not dependent from the settings.php I think your location is allright...
Ron, the script first read the METAR information found in the script itself then, if the script finds an external configuration file (produced by either Cumulus and Weather Display) it then read data from that file, including the METAR 4 letter ICAO code.
nitrx wrote:... but I cant' figure out why the value of the temperature is broken you got the script from Ray so maybe he can figure it out ..
OK, I have figured out why the temperature information is corrupted: It is cause by the dreaded degree symbol ('°') and web page encoding!! I have been looking for a solution and I have yet fond one. I shall be back later on with, either a solution or a 'hack'... :oops:

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Fri 04 May 2012 7:10 am
by ergie
Hi,
I now when I set all values to false my cloudsbase altitude hangs on 174m.
I think it is not normal. Before all the time was 180m and now always 174m and not moving at all.
My outside humidity sensor is broken and all time shows me 99% so maybe this can be reason for this problem?


BEGIN IMAGE DETAILS SETTINGS #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php


Thanks,
Rim

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Fri 04 May 2012 7:11 am
by nitrx
I had a look at the cloudbase.php from 'ergie' end it seems to be in UTF-8 , mine is in ANSI so 'ergie' can give it a try to write it in ANSI perhaps the '°' will be OK then ? (use notepad + for converting it to ANSI)

Re: How to insert cloudbase.php scrip on ajax/php site?

Posted: Fri 04 May 2012 7:15 am
by nitrx
ergie wrote:Hi,
I now when I set all values to false my cloudsbase altitude hangs on 174m.
I think it is not normal. Before all the time was 180m and now always 174m and not moving at all.
My outside humidity sensor is broken and all time shows me 99% so maybe this can be reason for this problem?


BEGIN IMAGE DETAILS SETTINGS #
#################################################################################
// Override the default variables with those found in (CU) CUtags.php
$useCUuom = false; // always use the cloud base height reported by Cumulus
$useCUHeight = false; // override the default variables with those found in (CU) CUtags.php
$useWDuom = false; // always use the cloud base height reported by Weather Display
$useWDHeight = false; // override the default variables with those found in (WD) testtags.php


Thanks,
Rim
You better use the cloudbase calculated by Cumulus or doesn't change this too ? I don't know how it's calculated but if the humidity is involved and your humidity sensor is broken the cloudbase calculation has no sense.