Design, Build, Test, Iterate

Archive for November, 2011

Using accelerometer data to correct for gyro drift

Gyroscopes do not measure acceleration, so they obviously cannot be used to calculate the direction of gravity. In other words, we can use gyro outputs to calculate an estimation of the direction cosine matrix, but the estimate will drift over time. A 3-axis accelerometer can be used to correct the roll and pitch drift, which […]

Orientation Kinematics with Direction Cosine Matrices

In a sentence, a direction cosine matrix is a 3×3 matrix containing the cosines between each of the 9 possible pairs of axes of two separate Cartesian coordinate systems. In the context of inertial measurement units in robotics applications, a 3D vector could be represented in either the global (earth) or the body (local) frames […]

A better Serial.print() for Arduino — making it work

Finding solutions is not always a trivial process, and once found, it is often the case that the solution Just Doesn’t Work. (In fact, just as I typed the above, my laptop decided to freeze up and die. I was going to refer back to my terminal outputs while writing the rest of this post, […]