??? 09/12/07 17:12 Read: times |
#144490 - 365/4 = 15 min of typing? Responding to: ???'s previous message |
Juergen Christoph said:
Just make a small table of 365 entries for sunrise and sunset for this particular location. And do not worry about february 29th, use data of 28th.
There accumulates an small error of approx. 4 minutes every 4 years; until the next february 29th, but this is for your application (switching lamps) not relevant. I use solution number 2 in my home automation system for a long time now and I'm happy with it (no floating point at all). It took me an hour to type the numbers in, that's all, no difficult algorithms to test and verify. Isn't it enough to type in a quarter of year's data, and use the "symmetry"? I admit it increases the "algorithm" complexity somewhat, but still no float (hah! :-) ) and 45 minutes of free time... ;-) Jan Waclawek |
Topic | Author | Date |
calculating sunrise and sunset time | 01/01/70 00:00 | |
You don\'t need to calculate it... | 01/01/70 00:00 | |
Link... | 01/01/70 00:00 | |
Google is your friend | 01/01/70 00:00 | |
Other Search Engines Are Available | 01/01/70 00:00 | |
Also | 01/01/70 00:00 | |
Keep it simple | 01/01/70 00:00 | |
365/4 = 15 min of typing? | 01/01/70 00:00 | |
where is the relation | 01/01/70 00:00 | |
I dont see the relation too | 01/01/70 00:00 | |
Hello Karim | 01/01/70 00:00 | |
or... | 01/01/70 00:00 | |
I doubt that | 01/01/70 00:00 | |
doubt | 01/01/70 00:00 | |
... floating point again... | 01/01/70 00:00 | |
Beautifully nasty | 01/01/70 00:00 | |
tnks ! | 01/01/70 00:00 | |
Craig or Steve | 01/01/70 00:00 | |
I guess so | 01/01/70 00:00 | |
Clarification required - is this 2 questions? | 01/01/70 00:00 |