Rocket Embedded System banner

Rocket Embedded System

3 devlogs
44h 58m 56s

A system so that my rocket can get precise altitude measurements, etc. I made it as a part of TARC and we used it for a lot of launches. It uses precise quarternion math and Mahony/Kalman filters in order to precisely predict apogee based on how f…

A system so that my rocket can get precise altitude measurements, etc. I made it as a part of TARC and we used it for a lot of launches. It uses precise quarternion math and Mahony/Kalman filters in order to precisely predict apogee based on how fast the rocket is going and other attributes like drag, tilt, etc. It ended up being super accurate, but the rockets itself weren’t that good so we didnt advance :/ It came coupled with an air brake that pretty much deployed in order to slow down the rocket to the desired height. Designing and cadding that part was cool but the rocket exploded and came crashing down. Anyways you can see a rocket launch along with the data I retrieved using the software, and what the completed PCB looked like with the code! Thanks so much for looking at my project!

This project uses AI

Used AI to help me understand some concepts since the math here is SUPER hefty, but I didn’t do any coding with it. Also used AI to write the readme 0_o

Demo Repository

Loading README...

tpranav2009

Shipped this project!

Hours: 44.98
Cookies: 🍪 811
Multiplier: 18.04 cookies/hr

This code predicts the apogee that the rocket will achieve during its flight, while the flight is happening.

Okay… Where do I even begin to explain this code. It might look like a small file, but this was easily one of the MOST difficult things I’ve ever done. Predicting drag and velocity using a filter was genuinely so hard, and I had to learn what crazy things like “quarternions” were to accurately differentiate tilt. I also had to use some calculus to integrate velocity and acceleration, which was also not fun. But in the end it predicted the apogee pretty well (I think it predicted 599 ft when it actually went 603ft on the second flight). The flight in the video that I showed went 676 ft but because I set the drag coefficient too low and messed up some integrals, it predicted 720 ft. But yeah, I’m really proud of how it came out and you guys can use the same code if you ever want to build a mid power rocket… Anyways, thanks for reading this and I hope that viewing this code helps you realize just how hard it was for me to build this and pack it in a rocket successfully…

OH MY GOD I forgot to mention that the Arduino we used had only 4096 bytes of memory, so optimizing that was ABSOLUTELY INSANE. No Idea how I managed to fit suich a complex algorithm in there but literally EVERY variable, function, and everything I coded had to be extremely specific otherwise the arduino just gave up and corrupted the data (which happened on one of the first tests)!

tpranav2009

OMG I completely forgot about this. SOOOOOOOOOOOO much progress over the past few weeks its insane. After our first rocket launch, here was the data! It was super epic to visualize it and I hope you guys understand it was NOTTT easy to develop! There’s a second test launch I could include but I won’t because the rocket kinda exploded… . I’m done with the project for now but it was a blast to make and for the subsystem to end up working. I had such a great time and learned so much about how Arduino, filters, and math work in coding!

I also attached a video of the rocket launch and the picture of the PCB once it got here.

Attachment
0
tpranav2009

Coded a large portion of the telemetry data, but kind of boring because it’s just Arduino code for now, nothing to see. On another note, I started designing the PCB for the rocket, which will connect to the code! I attached it to this log (I know it’s not directly code, but it’s what I’m designing at the moment and I can demonstrate what the code does once my PCB arrives). Hoping I can attach a video or photo of my rocket being calibrated or at least the system working with the PCB before I ship…

Attachment
0