cloudy

Author Topic: Graphic sun position  (Read 42612 times)

0 Members and 3 Guests are viewing this topic.

Offline TH68

  • Posts: 3
Re: Graphic sun position
« Reply #390 on: February 21, 2011, 10:47:29 AM »
Hi Niko

Great from you. It seems to be working.
 :multi: :hello1:
Thanks
Cheers

Offline eb3bvb

  • Posts: 67
  • Torrelavega, Cantabria
Re: Graphic sun position
« Reply #391 on: March 07, 2011, 03:07:20 PM »
hello
I am using sunposb and note that in other seasons they change the background color, can you tell me which parameter is set wrong or I have to change the color, I always blank out
thanks
emilio #-o

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic sun position
« Reply #392 on: March 07, 2011, 03:21:38 PM »
What version of jpgraph are you using?

Offline eb3bvb

  • Posts: 67
  • Torrelavega, Cantabria
Re: Graphic sun position
« Reply #393 on: March 07, 2011, 04:08:48 PM »
// File:        JPGRAPH.PHP
// Description: PHP Graph Plotting library. Base module.
// Created:     2001-01-08
// Ver:         $Id: jpgraph.php 1924 2010-01-11 14:03:26Z ljp $
//


emilio

Offline Axelvold

  • Posts: 980
  • Axelvold / Sweden
  • Axelvold, Sverige
    • Axelvold's weather and photo
Re: Graphic sun position
« Reply #394 on: September 03, 2011, 03:12:20 PM »
Here is another script that plots the sun position.it's based on open flash charts.




Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic sun position
« Reply #395 on: September 03, 2011, 03:23:35 PM »
Is there a link to the script?

Offline Axelvold

  • Posts: 980
  • Axelvold / Sweden
  • Axelvold, Sverige
    • Axelvold's weather and photo
Re: Graphic sun position
« Reply #396 on: September 03, 2011, 04:15:00 PM »
Sorry, did forget that.

I cant remember where I did download it, but you could check out this thread, http://www.weather-watch.com/smf/index.php/topic,31434.0.html



Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
    • Countryside Manor
Re: Graphic sun position
« Reply #397 on: December 28, 2011, 12:13:25 AM »
I changed

$dst = date("I");
$tdiff = ((date("Z"))/3600);
$year = date("Y");
$mo = date("n");
$day = date("j");
$ahour = (date("G") + (date("i")/60));

to fix the errors, but now getting

Warning: Cannot use a scalar value as an array in sunposa.php on line 309

Notice: Use of undefined constant sunset - assumed 'sunset' in sunposa.php on line 328

Notice: Use of undefined constant sunrise - assumed 'sunrise' in sunposa.php on line 328

Notice: Use of undefined constant sunrise - assumed 'sunrise' in sunposa.php on line 340

Notice: Use of undefined constant transit - assumed 'transit' in sunposa.php on line 341

Notice: Use of undefined constant sunset - assumed 'sunset' in sunposa.php on line 342

Notice: Use of undefined constant transit - assumed 'transit' in sunposa.php on line 345

etc..

I recently got upgraded to a newer version of php 5.2.14 and now the script breaks.. 

can anyone post a new source that works under that php version?

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic sun position
« Reply #398 on: December 28, 2011, 02:31:36 AM »
What errors were you seeing before?

Can you post the php code that's giving the errors?

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
    • Countryside Manor
Re: Graphic sun position
« Reply #399 on: December 28, 2011, 02:40:57 AM »
it worked before.. now its broken..its a upgrade to php

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
    • Countryside Manor
Re: Graphic sun position
« Reply #400 on: December 28, 2011, 03:05:33 AM »
i used the script that was posted..  

http://www.weather-watch.com/smf/index.php?topic=47997.0
« Last Edit: December 28, 2011, 03:07:14 AM by tman1991 »

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,157
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: Graphic sun position
« Reply #401 on: December 28, 2011, 03:20:35 AM »
What was the error before you made the changes?

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
    • Countryside Manor
Re: Graphic sun position
« Reply #402 on: December 28, 2011, 03:23:19 AM »
i had no errors..  i had to switch servers for webhosting to get PHP/DOM/XML for another script..  

the script now doesnt work.. NOTHING changed besides the server PHP version..

Im hoping that someone has a working script they can post that works on PHP v5.2.14

this is line 309
for ($i=0;$i<=24;$i++){$tm[$i]=$sunazi[$i];}

« Last Edit: December 28, 2011, 03:42:51 AM by tman1991 »

Offline tman1991

  • Posts: 524
  • Tucson, AZ (US)
    • Countryside Manor
Re: Graphic sun position
« Reply #403 on: December 28, 2011, 04:11:10 AM »
ok got a working copy..   in graphconf.php 

$tm = 30; // Top Margin

turns out this new version of php checks to see if a variable is declared in a previous include.. it was as a scalar..  so the usage of array broke it..

I also had to initialize the variable $z to 0.0.. And change 4 other variable names to not conflict..


Offline vouhead

  • Angelos
  • Posts: 204
  • Waiting for the 1988 Blizzard
  • Thessaloniki Greece
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 18.0.1025.151
    • Vouhead Weather in N. Greece - Central Macedonia - Thessaloniki - Kato Pylea
Re: Graphic sun position
« Reply #404 on: April 06, 2012, 05:48:13 AM »
Hi, thanks for the nice and very detailed script.
I managed to have Greek characters in the graph. Using the SymChar::Get( ).
So I made a file (symchar_greek.php) with all the Greek letters, lowercase and uppercase, and put it in the jpgraph folder. Than I made a second script with the Greek characters and a call to the new file (include "../jpgraph/symchar_greek.php") in the Settings area.
Also the fonts must be truetype (ttf).
The spelling is something like this
$graph->title->Set($Theta.$Epsilon.$Sigma.$Ny......)
Not all lowercase letters work for me :roll: so I used only the uppercase letters choice. Also this method is not necessary in all places.

I have had also php errors and find another way for the moon values. Using 'testtags.php'
Wrote in the Settings area (include_once "../testtags.php") and than called the moon values.
$moonrise for $mrise
$moonphase for $millum%
and added
$moonset

http://www.weather.vouhead.gr/wxastronomy.php

Made some other changes not relevant to this reply, so watch out if You will use something from the script! :wink:
« Last Edit: April 07, 2012, 04:43:49 PM by vouhead »

 

cumulus