Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/12/07 16:05
Read: times


 
#144484 - Keep it simple
Responding to: ???'s previous message
Hello

There are two different options, you already mentioned them I think.

1) You are going to make a product, that shall be sold elsewhere in the world.

Then you may want to configure the system with latitude and longitude, and let an algoritm calculate the data. Also take into account that beyond the polar circle there may be no sunrise or sunset for several days at all; but maybe twiligth for a few hours, depending on the location (I've been there, I've seen it).

However, it is more likely that this aplies for your problem:

2) One product for a known and fixed location.

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.

Best regards
Juergen



List of 20 messages in thread
TopicAuthorDate
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      

Back to Subject List