rconradharris, would you be willing to share the code you wrote for calculating the sun position - specifically for getting civil twilight?
I've spent the last few days on-and-off trying to implement it in Monkey C, and it's been tough finding a straightforward formula. The link you provided is no longer active, and the definition I've been trying to use isn't outputting reasonable values (I think because sometimes the author uses radian and sometimes degrees, without specifying clearly enough).
I'm trying to add small arcs around my analog clock face to show the span between sunset & civil twilight. (You can see the "redline" below which maps to sleep time. The plan is to add a small arc like this around sunset, starting at sunset and ending at civil twilight.