czwartek, 18 marca 2010

Actionscript class to calculate sunrise and sunset time

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

1 komentarz:

  1. Hello!
    It seems that link is broken :(
    Could you please put SunriseSunsetCalculator.as on some other repository? Sure if you still have it locally.
    I wanted to play a bit with sunrise/sunset time to create an app to show vedic daily routine.
    Thank you in advance!

    OdpowiedzUsuń