but also....... with a few known data points like Hennrik states, a simple calculation is possible. The change in rise and set times per day is a known from charts for a given latitude. So at some given latitude, the overall change in rise and set in hours and minutes can be estimated. And that happens for 180 days at a time, longer for 180 days and then going shorter for 180 days. So with Hennric's example, sunrise changes for 254 minutes ....or 254/180.... on average adds 1.4 minutes a day. Similarly, sunset (with it's minutes calculation) goes X minutes lower each day. Could keep a byte counter to track days of 1 to 182 and when 182 is reached, the additions and subtractions are switched. Those days are Summer Solstice, about June 21 ..... and Winter Solstice ABOUT December 21. Those are the dates to switch the additions and subtractions for rise and set... So only check for dates of change (182 days apart), keep track of mode (season... getting longer/shorter) and add or subtract minutes daily from some basic set point.




Bookmarks