Here is a simple Actionscript class that calculates the sunrise and sunset time for given date and coordinates ( latitude , longitude ) . It's based on the algorithm I found on National Oceanic & Atmospheric Administration , and implemented in AS.
It seems to generate accurate results, but I have not tested it extensively..
It needs some improvements (like DST, and solar noon calculation), and I should improve it soon I hope ;).
I'd like to put up an example of usage using google maps in the next few days if I'll have some time for it..
SunriseSunsetCalculator.as
Subskrybuj:
Komentarze do posta (Atom)
0 komentarze:
Prześlij komentarz