Starting to Implement the RTIMULib Library

I’ve continued to work on the example sketch provided for RTIMULib (as referenced in my previous post). As stands, the sketch is quite cryptic and roundabout, so I’ve made an effort to clean it up and split the code up more.

The sketch used to just print off the fused pose data over serial, but now I’ve actually made a function that, when called, will return the current Euler angles, pressure and temperature recorded by (and fused from) the IMU.

Firstly, I had to find a way of setting all 5 of these values from inside a callable function. Now I could just use global variables – and may still do, if this seems easier – but that doesn’t seem like a very clean or efficient way to do it to me.
(continued)

Read More

More Sensor Fusion

Right, I’ve spent the last few hours condensing and altering Polulu’s AHRS System, which I have been planning to use for getting orientation data from my IMU board. As it came, it was just one large sketch (actually a group of 7 files, I think) that took the raw data from the board and turned it into Euler angles for orientation. I had to put it all into a class and alter the function names, etc. etc. so that I could use it as a library with my main Arduino sketch.

The long and short of it is, I’ve finally got it working as a library but on further testing I’ve noticed a significant drift in the sensor values.
(continued)

Read More