# Test case of using Euler Parameters instead of Euler angles

by
Dale Lukas Peterson
—
last modified
Jul 05, 2010 10:00 PM

To better understand how Euler parameters work, I coded up an animation of rigid body motion using Euler parameters instead of Euler angles.

Euler parameters had always seemed like a nice idea, but until recently, I had no experience with actually using them. We've had a few discussions around the lab about them, and they seem to be standard fare in all the commercial inertial measurement units we've been looking at, so I figured is was about time to get my hands dirty with them. I used Autolev to derive the equations, and then coded up a simulation that made use of the GSL and OpenGL to animate the simulation results. The source code that generates this animation is here:

For the animation shown, the initial conditions were w = [.1, 3.0, .1] about the body fixed x-y-z axes, and the principal moments of inertia were Ixx=1.0, Iyy=2.0, Izz=4.0.