I’m specifically looking for small microcontroller implementations for a simple clock project. I want to use a good temperature compensated real time clock and/or network time protocol-only (no sunrise/sunset APIs), to calculate local solar noon, sun rise, and sunset times. Then I want to make my own local time where midnight/bedtime is simply 9 hours before sunrise on any given day. I am in special life circumstances where I have no real use for daily coordinated time. This is a little psychology experiment more than anything else. I’m super rusty on the math.


https://github.com/dmkishi/Dusk2Dawn
Thanks! This repo’s readme leads to gml.noaa.gov/grad/solcalc/calcdetails.html. This then references Astronomical Algorithms by Jean Meeus. That is available from the above linked archive.org page.
This is much closer to the real reason I was asking, as this little clock is intended as a primer for understanding object tracking for both astronomical observations and local rocket launches or transits.