Show HN: Rocket Launch and Orbit Simulator (donutthejedi.com)
I (17y/o) have been developing a rocket launch simulation that allows the user to explore what it's like launching a rocket from earth and putting it into orbit. This idea originally started as an educational simulation but as i've gone more down the rabbit hole the more i've wanted to make it realistic. The problem is that I've never had a formal orbital mechanics class or anything like that so I don't know what I'm missing, what I currently have implemented is:
Variable gravity
Variable Atmospheric drag (US Standard Atmosphere 1976)
Multi-stage rockets
Closed-loop guidance / pitch programs (works well within ranges 350km to 600km)
Orbital prediction and thrusting options to change your orbit.
The feedback I'm looking for is: UI improvements and possible future physics implementations that I can work on.Current code and physics can be found at: https://github.com/donutTheJedi/Rocket-Launch-Simulation
14 comments
[ 2.6 ms ] story [ 35.1 ms ] threadBiggest low-hanging fruit UI improvement would be mobile responsiveness. It was a bit challenging testing on my phone.
JK, nicely done! lots of fun to watch.
I've been toying with the idea of building something similiar but with a bunch of different space stuff, like a calculator for different rotating space station geometries, mars/lunar cycler orbits, or solar shade sizes/distances.
It's been many years since I've done this kind of stuff in school and it's great to be able to refresh yourself on this stuff. The kind of UI you're using makes it really friendly and approachable, like a game.
Looking forward to seeing the next iteration. Nice work.
How accurate are the simulations? I'm able to get orbit by turning 45 degrees as soon as I launch and then doing some minor burns at the height of the initial trajectory.
I don't feel like this strategy would work in real life.
We just don't do it on Earth because we need to get out of the atmosphere first for efficiency and structural reasons. But on the moon or another vacuum body, "diagonal kick followed by minor circularization burns at apogee" is pretty close to the optimal strategy. Even on Earth, it's similar to the trajectories proposed by SpinLaunch and other "space cannon" concepts.
If it's your thing you could try implementing it and getting a single continuous burn to final orbit.
Awesome work BTW!
[1] https://ntrs.nasa.gov/citations/19740004402
[2] https://github.com/Noiredd/PEGAS
Edit: I now see it's on your roadmap, so I guess it is your thing.
Regarding other comments about AI use, I tend to agree but can maybe add some context.
I finished my ME degree this fall and found dynamics to be the most enlightening course for me by far. The ability to build a reasonable approximation of real-world systems from a set of reference frames and ODEs is incredible, and I find that it has affected the way I see the world in a meaningful way.
That said, a well-defined set of reference frames in particular are the "unsexy" backbone of modeling & sim work, and I acknowledge that the barrier for entry is somewhat high (cumbersome notation, some linear algebra/ODE prerequisites). It seems like you may already have run into a reference frame issue based on some of the other comments. I still think that this is worth learning unassisted by AI! If you're a textbook guy, Kasdin and Paley's Introduction to Engineering Dynamics is how I learned. If not, I'm sure many other online sources are useful.
And once again, great work here. I have no doubt that this will be useful for your college search, especially with a well-understood dynamics foundation. Best of luck!