Monthly Archives: February 2016

Quaternion Formulas

Here’s a collection of quaternion formulas. Quaternions are very useful for orientation sensing, game programming and augmented reality applications. Magnitude Normal Quaternion Conjugate Axis Angle To Quaternion Where the axis is v and the angle is theta Quaternion To Axis Angle Where theta is the angle and v is the axis vector Quaternion From Angular… Read More »

Integrating Gyroscopes – Calculating Orientation pt2

Integrating Gyroscopes Gyroscopes measure angular velocity. As with regular velocity, by multiplying by time you get change in position (a distance). By adding these distances up as you go, you can estimate position. Naturally, every little error will also get added up and eventually you’ll end up with large errors. This is called drift and… Read More »

Quaternions And How to Really Use Them

Quaternions are often used in attitude and heading systems to represent orientation. This post describes quaternions and how to use them in orientation and navigation systems. Quaternions If you type ‘quaternion’ into google, it’ll tell you something like this a complex number of the form w + xi + yj + zk, where w, x,… Read More »

IMU Maths – How To Calculate Orientation

IMUs typically contain 9DOF sensors and are used to calculate orientation. Let’s talk about the maths required to get orientation (pitch, roll, yaw) from these sensors. Getting The IMU Maths Library There once was an IMU maths library that I made and it’s been incorporated into quite a few cool projects ( such as this… Read More »

Ninjaskit Keypad Library

I’ve just finished making a groovy little library for button matrix keypads. GitHub Page Matrix keypads are fairly simple to use. They’ve got rows and columns, and each button connects a particular row to a given column. To check if a switch is pressed – let’s say SW1 – you could put a digital high… Read More »