4 ms·
Spyce: Python in outer space! Basically, a very much work-in-progress pile of code to plan orbital trajectories and interplanetary travel. Its also quite handy
by yoha 11y ago
Spyce: Python in outer space!
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/ https://github.com/qsantos/spyce/
- fatlasp 11y agoVery cool - going to hand this off to some of my colleagues to play around with
- yoha 11y agoThanks! 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).
- deleted 11y ago[deleted]
- kartikkumar 11y agoVery cool! We're in the processing of building up an open-source stack for the space industry. Engaged with a few partners already. Would you be interested in having a chat?
- yoha 11y agoThanks! You can contact me on the address listed on my Github profile, or the one on my Hacker News profile (yoha@sinon.org)!
- dovin 11y agoAwesome! Pretty easy to get it up and running, not counting OpenGL. What would be really cool to see is an example of how you could use this to interactively calculate, say, the path of some of the satellites we've launched into the outer solar system that needed complicated orbital trajectories.
- yoha 11y agoThanks! 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.