This time of year folks start noticing the days getting longer. How much longer they wonder? I know because I measure every day from my own backyard. data
The CdS photocell taped to a basement window with electrical tape and sampled live every five minutes. plot
From my latitude I see days last 8 hours in the winter to 16 in the summer with a maximum rate of change in the spring and fall of 3 minutes a day.
To arrive at these numbers I linearly interpolate five-minute interval samples to estimate the time of day, morning and evening, that illumination passes the 50% level. The computation processes 1/2 million measurements taking five seconds to run. I repeat this with current data upon each web request. github
Daylight hours vary sinusoidally throughout the year. I omit data outside reasonable range but don't consider time of year so as to eliminate some oddball readings.
The 50% of sensor range threshold was chosen for stable interpolation rather than any particular definition of sunrise or sunset. In January first light occurs about 30 minutes before the morning's threshold crossing and deep dusk about 30 minutes after the evening's.
I compute average change over the 14 days leading up to the reporting date. Averaging over 7 days before and after would provide similar smoothing without introducing the bias which shows the solstice (change crosses zero) arriving 7 days late. github
An interesting observation would be to extract the length of twilight and its variation throughout the year. Similar interpolation could find times for 25% and 75% illumination from which this period could be estimated.
With spherical trigonometry and a few assumptions daylight hours can be solved analytically. page
In 2011 I modified the detector mounting to avoid most light pollution from indoor lighting. Also converted to Txtzyme and started averaging a burst of readings, eventually tuned to 1/60 sec to cancel hum. github
In 2013 my sensor recording when offline after a local power failure. Reboot was insufficient to restore service because intentional disfunction added to Ruby/Sinatra in the previous year.
In 2015 I found the nature of the disfunction documented and restored service by adding a now mandatory 'bind' declaration to my service.
In 2017 I notice that hours of daylight are varying less with every year. I assume I am measuring changes in foliage or some instability in the CdS cell I use to make the measurement. Earth's orbit has been stable.
The U. S. Naval Observatory reminds us that the dates of earliest sunset and latest sunrise are the dates before and after the winter solstice when, at a given latitude, the magnitude of half the daily change equals the magnitude of the daily change of the Equation of Time. post