u/mcpatface
r/astrophysics
Spacefaring, a sim for planning spacecraft trajectories in the solar system (works in browser)
Real-life space missions often look nothing like KSP trajectories, especially when we go beyond Hohmann transfers and make full use of everything physics has to offer. So I'm working on a sim to explore spacecraft trajectories around the solar system, perturbations and all. Start from a launch site on Earth, drag launch params and add engine burns; the sim recalculates the full trajectory and total ∆v in real time. Jump around the timeline to edit your mission at different times, and switch reference frames to change the "perspective" of the visualization. **Try it here!** [**https://spacefaring.is/**](https://spacefaring.is/) (works on a desktop browser) Things to try (\~easy to hard): * Intercontinental ballistic missile: pick the "Earth (surface)" reference frame, spawn a spacecraft, adjust launch az/el/delta-v, and try to ~~hit~~ land at your favorite target around the world :) * Hit the Sun (it's really hard, unless you're fancy & do a Jupiter slingshot first or something) * Make a plane change so stupidly long that your inclination [loops back to where you started](https://www.reddit.com/r/astrophysics/comments/1kjzizm/i_tried_simulating_a_long_planechange_maneuver/) * Ion engine spiral: start from any orbit, add a super low-thrust prograde burn (drag the acceleration slider left) & watch it burn for hours or days (might lag a little :D) * Geostationary orbit: make a circular orbit around 35768 km altitude; pick the "Earth (surface)" reference frame, then play with burns over the equator to fine-tune your trajectory until you're perfectly stationary over a point on Earth (picking "Earth (orbit)" as burn frame should be easier!) * Earth-Moon free return: start in some Earth orbit (not too inclined relative to the Moon), pick the Earth > Moon > Lagrange reference frame, add a prograde burn on roughly the other side of Earth, then play with start time & prograde m/s until you get a figure-8 around Earth & Moon * Low energy lunar transfer... left as an exercise for the reader haha, but for inspiration see diagrams for [SMART-1](https://en.wikipedia.org/wiki/SMART-1#Lunar_impact), [GRAIL](https://en.wikipedia.org/wiki/GRAIL#Transit_phase), [Danuri](https://en.wikipedia.org/wiki/Danuri#Launch), [CAPSTONE](https://en.wikipedia.org/wiki/CAPSTONE#Mission), [SLIM](https://en.wikipedia.org/wiki/Smart_Lander_for_Investigating_Moon#Fifth_lunar_day) Or just check out some special rocks and comets: * 469219 Kamo'oalewa does a twisty figure-8 over one year in the "Earth (orbit)" reference frame ([wiki](https://en.wikipedia.org/wiki/469219_Kamo%CA%BBoalewa)) * 2024 YR4 got really close to Earth around Christmas 2024 & again in 2032 ([wiki](https://en.wikipedia.org/wiki/2024_YR4)) * 3I/ATLAS I think y'all know it ([wiki](https://en.wikipedia.org/wiki/3I/ATLAS)) Would love to hear what you tried, or what would make this more useful! \--- Currently only simulates n-body gravity, spherical planets (although Earth has a J2 term), and collision detection; no atmospheres, moons around other planets, geoids/mascons yet. Integration: Verlet (celestial bodies), RK45 (spacecraft). Written with Bevy.