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

RTIMULib Sensor Fusion Library

Right as mentioned in my last post I have decided not to stick to Polulu’s quite unreliable Arduino sketch that I assembled into a library, because of the significant drift in the results.

Rather, I’ve now (for the time being) settled on richards-tech’s RTIMULib-Arduino library which is a very complex but highly functional library designed specifically for use with the IMU board I’m using (and some others). What this means for me is that I can include the library in my sketch and not have to worry about the inner workings of it for now – although I’d like to produce my own algorithm at some point in the future.
(continued)

Read More