Freesteel Blog » Sudden calibration jumps with the BNO055

Sudden calibration jumps with the BNO055

Friday, June 5th, 2015 at 3:39 pm Written by:

This BNO055 absolute orientation sensor is just the thing I’ve been after for logging the hang-glider direction and heading. It combines the compass and accelerometer sensors into a single package with its own co-processor running proprietary sensor fusion software, so I don’t need to get into the business of decoding making sense of this sensor data.

The theory for calculating absolute orientation is as follows.

Absolute orientation is represented by three degrees of freedom: horizontal heading, roll and pitch. At rest (held within a particular orientation), there are two absolute vectors which can be sensed: the gravitational force (downwards) and the earth’s magnetic flux (about 23degrees off the down vector towards the north, if you are in the UK).

Knowing an absolute unit vector relative to your oriented frame constrains two degrees of freedom. Think of this as a fixed pin passing through your object like it’s a beetle on a specimen tray: the bug can only spin its body around the pin. Two such pins could nail down four degrees of freedom, but there’s only three, so the extra information is redundant and can be used to estimate the accuracy of the measurement.

Each of the sensors on the BNO055 device requires calibration, according to the datasheet:

3.10 Though the sensor fusion software runs the calibration algorithm of all the three sensors (accelerometer, gyroscope and magnetometer) in the background to remove the offsets, some preliminary steps had to be ensured for this automatic calibration to take place. The accelerometer and the gyroscope are relatively less susceptible to external disturbances, as a result of which the offset is negligible. Whereas the magnetometer is susceptible to external magnetic field and therefore to ensure proper heading accuracy, the calibration steps described below have to be taken.

I’ve been logging the quaternion heading from this sensor and then trying to relate it to the motions I was making. Unfortunately, sometimes there was a complete sudden reversal of the orientation mid-flow, even though I wasn’t making any sudden motions:
bnocalib

Here’s the log from this moment that occurred at the timestamp=61350

tstamp  qw  qx    qy   qz     mag calibration status
61050 15158 336   41   6208   1
61150 15419 431   103  5522   1
61250 15664 510   164  4774   1
61350 722   234   -654 -16353 2
61450 244   -530  777  16355  2
61550 1460  -929  852  16270  2
61650 2277  -1019 921  16167  2
61750 3023  -1249 1137 16014  2
61850 3509  -1358 1335 15890  2
61950 4023  -1386 1477 15753  2

Funnily enough, for such a complicated packaged system, there are absolutely no configuration settings at all — except for one option known as NDOF_FMC_OFF, which is “the same as NDOF mode, but with the Fast Magnetometer Calibration turned OFF”. (NDOF stands for “9 Degrees of Freedom”, which I guess refers to the fusion of 3 magnetic flux axes, 3 accelerometer axes, 3 gyro axes into a single measurement.)

The fact that you can turn off the so-called “Fast Magnetometer Calibration” mode suggests there is something special about it: ie it might be buggy.

Anyway, I don’t have time to check out what this does otherwise. I’ve wasted enough on this already. I should go look at something else.

Which of course means I’m just putting this off till I have some logged flight data. Which might be complete junk.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>