by yoha · 10y ago · 0 comments
Basically, a very much work-in-progress pile of code to plan orbital trajectories and interplanetary travel. Its also quite handy when doing simple computations:
>>> # distance to the Sun, in light-seconds
>>> Earth.orbit.semi_major_axis / c
499.00650691887006
>>> # Martian year, in (usual Earth) days
>>> Mars.orbit.period / Earth.solar_day
686.9944644093075
>>> # ping to New Horizons (light roundtrip), in hours
>>> (Pluto.orbit.periapsis - Earth.orbit.apoapsis) / c / 3600 * 2
7.9167895224639375
The graphical interface does work though! (kinda) It's initially inspired from Kerbal Space Program, so it defaults to showing Kerbin and its universe. However, you can choose Earth instead. I like to just zoom in and out, and explore the Solar system; the vastness of that is so mindblowing!How yeah, and a link: https://github.com/qsantos/spyce/
I know how much of a hassle it can be to handle even simple dependencies when you use a different system and workflow, so I tried to make it as seamless as possible.
There still is a lot of work to do. For now, I only implement patched conics (i.e. I only consider one planet/moon at once and ignore the influence of other celestial bodies on the trajectory), and it is not really easy yet.
Handling n-body physics would not be that hard, but I prefer to focus on having a simple model (patched conics) work well first.
Don't hesitate to contact me at either yoha@sinon.org or at the mail address on my Github profile, if someone have an issue installing. It should work on both Linux and Windows but I have not yet any nice packaging, so it might require some tweaking around (i.e. installing PyOpenGL on Windows manually).
You can contact me on the address listed on my Github profile, or the one on my Hacker News profile (yoha@sinon.org)!