Graphic sun position

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,


zonpositie.jpg

How do you get this to work?

Regards

Jose

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.: 3dspace.de is available for purchase - Sedo.com

Regards

Jose

Also found this one:

It looks like a clientraw jp graph!?
I just mailed the webmaster - he’s also a WD user :slight_smile:

And no, the other image can not be linked, because it is part of a flash file.

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.

The dark blue graphic is made by Pinto.
I just received an e-mail from Ren

Fine. Would you share it?

here it is
set $lat and $lon to your position

Edit: Breitling wrote this see here

As usualy Pinto, excellent work, thank you, i have it running here :slight_smile:
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 :slight_smile:

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

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:

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

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…

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

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 :frowning:

I’m having similar issues… though I am GMT-7 here in Southern California… the graph is showing the sun as set, when in reality it isn’t even mid-sky yet…

I’m not sure, bit what does that mean?

$diffUTC=date("O",time())/100;

different from UTC Universal Time Coordinates? Mine shows (correctly) GMT which is Greenwich Mean Time.

Is there the error?

Regards

Jose

I tried changing that but it didnt work, yours is showing the same as mine, shouldnt yours be
showing 20:00 and not 18:00 then again your 2hrs ahead of gmt aint you, i aint got a clue? lol

Well, it shows GMT. Therefore minus 2hours from me is ok. Only question is if the graph is for my location or for gmt?

Sun is going down here and the sunset for my location is about 8.20pm. So I think it must be correct for me.

Interesting is that indifferent what you enter between the two () of time.

The graph is chaning a bit.

$diffUTC=date(“O”,timecolor=red[/color])/100;

I see now the green letter is an O, not a zero!