I almost finished this project and this is the first time I've really written anything more than what is in the README. I decided to take on this project in early August 2019. It has been a huge amount of work but I am extremely satisified with how far it has come given starting from nothing and having never designed an entire embedded system from scratch. I am eager to continue on with other projects, so I decided to hold off on the full quaternion estimation and control scheme, as it would be quite time consuming to fundamentally learn how the algorithms work (this project is about fundamentals).
A lot of the inspiration in design has been taken from PX4 and ROS. I favored reducing complexity and increasing ease of use by using the C++ standard library and STL. This does use more flash. This does use dynamic memory allocation (allocates once at the beginning). You do have to be more careful about what you do and how you do it. However it offers enormous flexability to write better code that is easier to understand. I didn't really implement anything more than "bare minimum" other than the DispatchQueue, which I used as a tool to familiarize myself better with FreeRTOS, timers, and scheduling in general.
Smashed my head into the wall trying to make the drone fly. Learned a lot, but definitely went at it with guns blazing and failed to notice obvious problems with the implementation. Fixed those problems and ultimately led me to understand what actually needs to be considered. Decided to build a test rig for tuning pitch/roll rate controllers. I will be able to independently control roll/pitch on a fixture with a rotating center beam, which the vehicle mounts to. I will also be able to connect via serial to view the data in real time thanks to my real time plotting python script. I have considered just writing the driver for a telemetry radio so I don't need hardwired PC serial... just one more thing to do.