There are some handy utils for un*x systems that can do the task of calculating sunrise/sunset/civil twilight/etc times given a latitude and longitude input. Unfortunately I was not able to locate any win32 console apps that can do this reliably. I found one written by an author who is no longer reachable and his contains a daylight-savings bug (DST calculation doesn't seem to work). Daylight savings is a very important and tricky factor.
The reason I would like to have such a program is to use it in batch files to schedule home automation tasks such as turning out outside lights, controlling thermostat settings etc, based on sunrise/sunset/twilight times which change each day.
As a starting point you might consider the following URLs for assistance with the algorithms:
http://www.codeproject.com/datetime/srss.asphttp://www.freevbcode.com/ShowCode.asp?ID=341http://xoomer.virgilio.it/vtomezzo/sunriset/formulas/index.htmlthere are others but that is a start...
will anyone be so kind as to create this program?? ;) all it needs to do is output the time in 24hour hh:mm format, no fancy GUI is needed (at least for me!). It would be good if it can accept some commandline arguments such as specifying a date manually (default would be todays date) and also the ability to output only the time you need for example just the SUNRISE time.
example:
>suntime.exe 40.734N 73.986W -time sunrise
05:39
>suntime.exe 40.734N 73.986W -time sunset
17:33
>suntime.exe 40.734N 73.986W -time twilight
16:55etc etc...
:Thmbsup: