- Dec 10, 2016
- 451
- 166
Hello,
Today I prepared a camera dedicated to do a TimeLapse of a Peony's growth (cameras are not only a security thing) so I need to take regular snapshots daytime only not at night but because the growth will last for many days the sunrise/sunset timing will change a lot.
So before I develop a tool myself (too lazy) I started digging and found a very basic command line tool that can answer that question, it is easy to include in a scheduled script that would run every 5 mins for example or launch the tool and ask it to only proceed/quit once the target sun status has been reached you can also use parameters to add some special options like +/- time offset if you want the script to work 2 hours after or before sunrise or wait for sun to reach x°angle.
Of course there are certainely other possible usage for such tool and (may be such kind of tool also exist in online version that can be called with a wget/curl and check for returned text) and if you have a camera with IR you could also check the IR light status and use it as a trigger instead of real sunrise/sunset but if you want something precise according to real sunrise/sunset this tool is for you.
The win32 exe is provided pre-compiled and the sources are available, compile it as usual with a call to "make" command inside the directory containing the makefile (I tested compilation for RasPi no problem).
Sunwait - Browse Files at SourceForge.net
Example 1: sunwait wait rise offset -1:15:10 51.477932N 0.000000E
Wait until 1 hour 15 minutes 10 secs before the sun rises in Greenwich, London.
Example 2: sunwait poll exit angle 10 54.897786N -1.517536E
Indicate by program exit-code if is Day or Night using a custom twilight angle of 10 degrees above horizon. Washington, UK.
Today I prepared a camera dedicated to do a TimeLapse of a Peony's growth (cameras are not only a security thing) so I need to take regular snapshots daytime only not at night but because the growth will last for many days the sunrise/sunset timing will change a lot.
So before I develop a tool myself (too lazy) I started digging and found a very basic command line tool that can answer that question, it is easy to include in a scheduled script that would run every 5 mins for example or launch the tool and ask it to only proceed/quit once the target sun status has been reached you can also use parameters to add some special options like +/- time offset if you want the script to work 2 hours after or before sunrise or wait for sun to reach x°angle.
Of course there are certainely other possible usage for such tool and (may be such kind of tool also exist in online version that can be called with a wget/curl and check for returned text) and if you have a camera with IR you could also check the IR light status and use it as a trigger instead of real sunrise/sunset but if you want something precise according to real sunrise/sunset this tool is for you.
The win32 exe is provided pre-compiled and the sources are available, compile it as usual with a call to "make" command inside the directory containing the makefile (I tested compilation for RasPi no problem).
Sunwait - Browse Files at SourceForge.net
Example 1: sunwait wait rise offset -1:15:10 51.477932N 0.000000E
Wait until 1 hour 15 minutes 10 secs before the sun rises in Greenwich, London.
Example 2: sunwait poll exit angle 10 54.897786N -1.517536E
Indicate by program exit-code if is Day or Night using a custom twilight angle of 10 degrees above horizon. Washington, UK.
Last edited: