cloudy

Author Topic: Graphic sun position  (Read 42612 times)

0 Members and 1 Guest are viewing this topic.

Offline Peter Palm

  • Peter
  • Posts: 461
  • It aint much, if it aint Dutch haha ;-)
  • Grave, the Netherlands
    • Weatherstation Grave - Holland
Graphic sun position
« on: April 13, 2009, 07:40:46 AM »
Goodmorning, I'm wondering if anyone ever tried to make a graphic with the actual sun position?

For my position I use following:


But I recently saw a nice graphic with the actual sun position and lines of min. and max. sun height (see attached file).
Does anyone have a simular graph or script or know where to download this?

Kind regards,

 



Offline Jose1701

  • Posts: 463
  • Germany
    • Wetter in Mülheim
Re: Graphic sun position
« Reply #1 on: April 13, 2009, 10:25:45 AM »
How do you get this to work?

Regards

Jose
WX Station Type OS WMR200 + UV + modified Solarunit

http://www.wetternet.org


Offline Peter Palm

  • Peter
  • Posts: 461
  • It aint much, if it aint Dutch haha ;-)
  • Grave, the Netherlands
    • Weatherstation Grave - Holland
Re: Graphic sun position
« Reply #2 on: April 13, 2009, 10:47:44 AM »
Hey Jose, the big image you get with this url:

http://www.sunposition.info/sunposition/spc/graph.image.php?loc=Grave, Nederland&lat=51 76 N&long=5 74 E&GMT=+1&DST=1

Change Grave, Nederland for yourplace, yourcountry and also change lat and long and check your timezone en summer time.

The other image I saw on a website, but I don't have a clue how they made that.
Must be a script I think!?

Offline Jose1701

  • Posts: 463
  • Germany
    • Wetter in Mülheim
Re: Graphic sun position
« Reply #3 on: April 13, 2009, 10:56:11 AM »
Hey Jose, the big image you get with this url:

http://www.sunposition.info/sunposition/spc/graph.image.php?loc=Grave, Nederland&lat=51 76 N&long=5 74 E&GMT=+1&DST=1

Change Grave, Nederland for yourplace, yourcountry and also change lat and long and check your timezone en summer time.

The other image I saw on a website, but I don't have a clue how they made that.
Must be a script I think!?

Thanks for the info. But do they allow do link it on your own page?

I think it is a script, too. It will calculate the position and shows it as a graph. Perhaps someone is able to code this ...
Found that, e.g.: http://www.3dspace.de/forum/thread.php?postid=255

Regards

Jose
WX Station Type OS WMR200 + UV + modified Solarunit

http://www.wetternet.org


Offline Peter Palm

  • Peter
  • Posts: 461
  • It aint much, if it aint Dutch haha ;-)
  • Grave, the Netherlands
    • Weatherstation Grave - Holland
Re: Graphic sun position
« Reply #4 on: April 13, 2009, 11:44:12 AM »
Also found this one:
It looks like a clientraw jp graph!?
I just mailed the webmaster - he's also a WD user :)

And no, the other image can not be linked, because it is part of a flash file.
« Last Edit: April 13, 2009, 11:49:21 AM by Peter Palm »

Offline Jose1701

  • Posts: 463
  • Germany
    • Wetter in Mülheim
Re: Graphic sun position
« Reply #5 on: April 13, 2009, 11:54:09 AM »
Quote
And no, the other image can not be linked, because it is part of a flash file.

But it works in a html file. Tested that.


This with the possibly jpgraph sounds great. Perhaps we can get a solution. Would be nice to have this on a weatherwebsite.
WX Station Type OS WMR200 + UV + modified Solarunit

http://www.wetternet.org


Offline Peter Palm

  • Peter
  • Posts: 461
  • It aint much, if it aint Dutch haha ;-)
  • Grave, the Netherlands
    • Weatherstation Grave - Holland
Re: Graphic sun position
« Reply #6 on: April 13, 2009, 12:22:42 PM »
The dark blue graphic is made by Pinto.
I just received an e-mail from René (Pinto's brother :))
I already though he had his hand in this :D


Offline Jose1701

  • Posts: 463
  • Germany
    • Wetter in Mülheim
Re: Graphic sun position
« Reply #7 on: April 13, 2009, 12:29:16 PM »
Fine. Would you share it?
WX Station Type OS WMR200 + UV + modified Solarunit

http://www.wetternet.org


Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Graphic sun position
« Reply #8 on: April 13, 2009, 12:55:20 PM »
here it is
set $lat and $lon to your position

Edit: Breitling wrote this see here
« Last Edit: April 13, 2009, 01:03:03 PM by pinto »

Bashy

  • Guest
Re: Graphic sun position
« Reply #9 on: April 13, 2009, 01:22:31 PM »
here it is
set $lat and $lon to your position

As usualy Pinto, excellent work, thank you, i have it running here :)
http://www.northantsweather.com/sunposition.php

I have now addd them to my astonomy page here
http://www.northantsweather.com/wxastronomy.php

Thanks to the OP for the idea :)
« Last Edit: April 13, 2009, 01:33:03 PM by Bashy »

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Graphic sun position
« Reply #10 on: April 13, 2009, 01:45:34 PM »
I wonder........
Can someone add the moon to it ?
I found a lot of info on how to do the calculations, even have a scource in C++, but I can't translate it to PHP

Offline Jose1701

  • Posts: 463
  • Germany
    • Wetter in Mülheim
Re: Graphic sun position
« Reply #11 on: April 13, 2009, 02:48:57 PM »
Thanks for sharing it. When I'm home I will try to put it on my site.

By the way, woudln't it be interesting to have it as an ofc? That when you point at the sun you got some data like Time or something else. I would program that but I can't.  :wink:

Quote
Can someone add the moon to it ?
I found a lot of info on how to do the calculations, even have a scource in C++, but I can't translate it to PHP

That would be great, too. So that at nighttime the moon appears.

Regards

Jose
WX Station Type OS WMR200 + UV + modified Solarunit

http://www.wetternet.org


Offline Peter Palm

  • Peter
  • Posts: 461
  • It aint much, if it aint Dutch haha ;-)
  • Grave, the Netherlands
    • Weatherstation Grave - Holland
Re: Graphic sun position
« Reply #12 on: April 13, 2009, 04:07:23 PM »
Thanks Joske, very nice graph  :thumbup:

@Jose: You should place the file in de directory where also the jpgraph directory is in.

graph dir
    |
     --jp (jp graph directory)
    |
     -- zonnestand.php

It should work this way...
« Last Edit: April 13, 2009, 04:11:14 PM by Peter Palm »

Offline Jose1701

  • Posts: 463
  • Germany
    • Wetter in Mülheim
Re: Graphic sun position
« Reply #13 on: April 13, 2009, 04:15:28 PM »
Thanks a lot. It works now, only one letter was false.  :oops:

You'll find it here www.wetternet.org --> Solar & UV & FWI --> Sonnenstand

Is it possible to show the time at the bottom, too?

Regards

Jose
WX Station Type OS WMR200 + UV + modified Solarunit

http://www.wetternet.org


Bashy

  • Guest
Re: Graphic sun position
« Reply #14 on: April 13, 2009, 04:33:58 PM »
I cannot get the correct time showing on mine, its an hour behind, i had a play with

/*  GLOBAL VARIABLES */
$lat = 52.448503;
$lon = -0.830455;
$diffUTC=date("1",time())/100;

$timeadj = $lon * (1/15);
$solarct = 1368;
$sunavgdist = 149600000;
$dayofyear = date("z") + 1 ;

but failed miserably, it should be showing 18:30 but its showing 17:30 :(

 

cumulus