views:

38

answers:

1

I'd like to calculate the position of the sun on a given date/time/position on earth?

How would I calculate this? Or the time of sunrise/sunset? Or where can I find information about calculating the sun movement?

+2  A: 

This is a good resource. I've used it ported to php.

EDIT

I have uploaded the snippet in php here. Might need some cleanup, but is a direct translation from resource above.

Tomas
Wow, great tutorial and sample! Need to dig into it to really understand the details, but this is just what I was looking for, thanks!
Sam