Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunrise and sunset at a location on the Moon #258

Closed
mhsundstrom opened this issue May 26, 2019 · 3 comments
Closed

Sunrise and sunset at a location on the Moon #258

mhsundstrom opened this issue May 26, 2019 · 3 comments

Comments

@mhsundstrom
Copy link

I have zero knowledge of how (or even if) this calculation could be accomplished in Skyfield, but as I read about the Chinese Change-4 lander the past several months, waking up at its local sunrise and shutting down at its local sunset (plus shutting down around its local noon thanks to the heat), I wonder if these times could be calculated via Skyfield. Thanks...

@brandon-rhodes
Copy link
Member

Skyfield does not currently have direct support, I don't think, for any of the NASA data files that provide orientation (and thus rotation) data for the Moon — so I think that would have to be added, or accomplished in a separate program, before sunrise and sunset on the Moon could be calculated? Or a much simpler equation for the Moon's orientation could be used. Oh: or, maybe libration information could be combined with knowledge of the Earth-Moon vector’s direction and Earth-Sun vector’s direction to determine where the sun is overhead on the Moon?

@brandon-rhodes
Copy link
Member

I have just released Skyfield 1.16 which implements support for lunar latitude/longitude locations. Try it out, and let me know if you run into any snags or problems with the implementation!

https://rhodesmill.org/skyfield/planetary.html

You should be able to combine this feature with the logic in almanac.py to find the time of sunrise and sunset — just take a look at how it’s implemented there for the earth, and write your own routine that does sunrise and sunset for the Moon. Let me know if you run into any snags!

@mhsundstrom
Copy link
Author

Thank you! This looks like it's working fine. Will be doing some more experimentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants