Eclipse finding #1004
labonocl
started this conversation in
Show and tell
Eclipse finding
#1004
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently looking into data from the recent eclipse in April 2024, and I needed to find out where it was. Instead of downloading tables of positions, I decided to write my own eclipse finder, as this does not seem to be implemented in Skyfield right now - at least not code that calculates the spatial extent of the eclipse, rather than "just" checking whether an eclipse occured or not. Please correct me if I am wrong.
Anyway, I made this: https://github.com/labonocl/eclipse_finding
The only real innovation, if you want to call it that, is the tracing of lines from the rim of one body (the eclipsee - typically the Sun) to the rim of the other body (the eclipser - typically the Moon), and seeing whether they hit the third body (what I call the screen - typically the Earth). While I am quite confident I am doing the right thing and I feel this code is general enough to calculate eclipses for any three bodies, I am sure there are edge cases where this code doesn't work.
Also, what this code desperately needs is the transformation of the resulting positions into a useful coordinate system - in the case of solar eclipses, the positions should really be in latitude/longitude. I am sure that is easily done, but it turns out that I get confused with coordinate systems - anybody who can help?
[Edit]
Well, I looked into it, added a transformation to ECEF coordinates, and I think I have it right - although my umbra is too big. Not sure what's going on there.
[/Edit]
[Edit2]
Found an error in my code when deciding whether to be in the (pen)umbra - now the umbra has the right size.
[/Edit2]
I'd be interested to hear what you think!
Beta Was this translation helpful? Give feedback.
All reactions