A record of doing a new thing every day in 2011
Getting so far behind on posting I’m close to forgetting what I did. Luckily with my trusty Bedside Clock phone app telling me I have 15 minutes before my alarm goes off, I can tell you of the progress of version 2.
One feature I’m considering is showing an icon that visually displays what time of night it is without needing to see the exact time - for those of us so short-sighted we have to get close to the phone to focus on it. My idea is to have a sun/moon icon depending on whether the sun has set or not, then different colors through the night.
First problem is to calculate the sunrise and sunset times, and this is what I learnt about Monday. It’s a spherical geometry problem, something I vaguely remembered a little about as I’d studied astronomy for a year at Uni. Searching around I found a very useful description of the algorithm at http://williams.best.vwh.net/sunrise_sunset_algorithm.htm, and after a few slips on the way not using the correct degrees or radians in the calculations I finally got some code to work.
Version 2 is coming along very slowly as this week I’ve been out late 2 nights running - a very rarer occurrence - but hopefully on track to be finished by April.