I'm working on the next release. The code has problems near the dateline (noon at midnight UTC) and the poles. The code works out when the sun rises and sets for a single UTC day - if it is run at night (local), it simply uses the day's calculated times for the next/previous day. This is a bit naughty, and can show dramatically near the poles. I'll put it right.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's nearly ready. I've resolved the dateline and high latitude problems. I've also ensured that offsets can no longer reduce daytime to less than zero. It's looking a lot more tidy - and simpler to read. So, I've swapped 0.8 into my home control system. If it works well, I'll release it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just released version 0.8. I've been asked to release the Linux code as a tar-ball. This seems sensible, as I can just add a new tar-ball for new versions. Let me know how it goes - or how it doesn't work - so I can improve or fix it. It was a bit of a shock when it was pointed out that version 0.6 only really worked for me in the UK. Hopefully this version will work reliably, everywhere.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm working on the next release. The code has problems near the dateline (noon at midnight UTC) and the poles. The code works out when the sun rises and sets for a single UTC day - if it is run at night (local), it simply uses the day's calculated times for the next/previous day. This is a bit naughty, and can show dramatically near the poles. I'll put it right.
It's nearly ready. I've resolved the dateline and high latitude problems. I've also ensured that offsets can no longer reduce daytime to less than zero. It's looking a lot more tidy - and simpler to read. So, I've swapped 0.8 into my home control system. If it works well, I'll release it.
I've just released version 0.8. I've been asked to release the Linux code as a tar-ball. This seems sensible, as I can just add a new tar-ball for new versions. Let me know how it goes - or how it doesn't work - so I can improve or fix it. It was a bit of a shock when it was pointed out that version 0.6 only really worked for me in the UK. Hopefully this version will work reliably, everywhere.
Thanks for this program/source with added features.
Successfully compiled for Asus router (RT-N66U; with mipsel-linux-gcc compiler; RMerlin firmware).
Usefull to schedule some actions for IP cameras.
Note: Typo in sunriset.cpp: written "Dirunal" insteal of "Diurnal" on line 103