Autonomous Model Rocket
We’ve all been there.. We see SpaceX rockets landing autonomously side by side and we get goose bumps. After YouTube suggested me an inspiring video of a Falcon 9 RC model hovering uploaded by Tom Stanton, I decided:
I want to create my own autonomous model rocket!!
What could possibly go wrong ?!?
Ok, What will we need?
We [don’t] want to simply strap a rocket engine to a cylindrical body and see what happens.
A better approach would be to write a physics simulator (either that or use an existing one) beforehands to predict what is going to happen. This library will be shared by the rocket model (that uses it to predict and adjust trajectory) and by a mission-control-like PC that receives live data.
Only once this is ready we will focus on the hardware!
Great, we have a Goal! This will be my workflow:
- Start designing a rocket and 3D-printing parts
- Stopping once you realise you need to design it properly
- Stopping once you realise you are missing basically every single Physics concept
- Start studying physics
- Pick an awesome and not-stressful-at-all programming language like C++
- Start writing a Physics Simulator before having a clear idea of all the Physics involved
- To be continued..
We start with a C++ physics simulator that makes use of numerical integration to run a n-body simulation.
We can also predict how bodies are going to behave in the near future by running ballistic simulation steps: