Replies: 2 comments 6 replies
-
If we could back up for a moment first — what does MOCTP stand for? If you explained the acronym, I haven't found it yet in your question. Second: why are you subtracting the minutes between an event on January 1 and on January 31? That doesn't make sense to me yet. |
Beta Was this translation helpful? Give feedback.
-
I think I have to disagree (at least slightly?), because January 1 is not the January date of the latest sunrise — and thus not of the latest end-of-civil-twilight. That occurs, typically, on January 4. I think what you want for your algorithm is |
Beta Was this translation helpful? Give feedback.
-
I've adapted your When will it get dark tonight? code, and was surprised to find that for any given location, if you calculate a month's overall civil twilight periods, its morning MOCTP can differ substantially from its evening MOCTP:
For example, I get a 20-minute difference in duration for Bristol Twp, PA, in Jan 2014:
I confirmed that I get essentially identical results on timeanddate.com for January 2014 — Sun in Township of Bristol, but have no easy means of determining whether any bug might be shared by their code and Skyfield (e.g., they could be using Skyfield or identical algorithm under the hood).
I found an equal difference (with same sign) for Sep, and absolute differences of 1 to 13 minutes for eight other months (excluding the DST-change months of Nov and Mar here for simplicity). My expectation was that morning and evening MOCTPs would be essentially identical, given the symmetry in sun path charts. Which of these four explanations applies here?
P.S. The identical sunrise times from timeanddate.com for Jan 1 through Jan 11 might offer a possible clue?
Beta Was this translation helpful? Give feedback.
All reactions