# Today’s The Day You Finally Learn Quaternions

If you’ve ever dealt with orbital mechanics or sophisticated computer graphics, you’ve probably run across the math term quaternions. [Anyleaf] has a guide to the practical use of this math concept which focuses more on practicality than theory. We like it!

Quaternions are one of at least two ways to model rotations in a 3D space. Most people are familiar with the classic Euler angles which cover yaw, pitch, and roll. However, this method is prone to some ambiguities — in other words, there are multiple ways to go from one Euler state to another and all are equally valid. In addition, Euler angles are prone to gimbal lock where two of the axes are parallel and, thus, don’t have a different effect on the object’s orientation. There are several ways to combat that including the use of quaternions.

# Mini Falcon 9 Uses NASA Software

[T-Zero Systems] has been working on his model Falcon 9 rocket for a while now. It’s an impressive model, complete with thrust vectoring, a microcontroller which follows a predetermined flight plan, a working launch pad, and even legs to attempt vertical landings. During his first tests of his model, though, there were some issues with the control system software that he wrote so he’s back with a new system that borrows software from the Space Shuttle.

The first problem to solve is gimbal lock, a problem that arises when two axes of rotation line up during flight, causing erratic motion. This is especially difficult because this model has no ability to control roll. Solving this using quaternion instead of Euler angles involves a lot of math, provided by libraries developed for use on the Space Shuttle, but with the extra efficiency improvements the new software runs at a much faster rate than it did previously. Unfortunately, the new software had a bug which prevented the parachute from opening, which wasn’t discovered until after launch.

There’s a lot going on in this build behind-the-scenes, too, like the test rocket motor used for testing the control system, which is actually two counter-rotating propellers that can be used to model the thrust of a motor without actually lighting anything on fire. There’s also a separate video describing a test method which validates new hardware with data from prior launches. And, if you want to take your model rocketry further in a different direction, it’s always possible to make your own fuel as well.