I have been using two BNO086 modules to detect relative yaw between an object (sailboat) and another object that rotates (mast) relative to the boat. I started with the sensor reports that combine accelerometer, gyro, and magnetic field but the magnetic sensors aren’t nearly accurate enough to help with relative orientation. The geomagnetic rotation vector typically changes by at least 10 degrees when rotating through a full circle. Now I use a report that combines gyro and accelerometer, and I use a Hall effect sensor to trigger when the mast and boat are aligned and resets the difference resulting from drift. That’s working but I would like to get better accuracy. Can anyone suggest a fusion library for the ISM330DHCX module? There are plenty of fusion libraries on Github but it’s hard to determine what’s recent and what’s still being maintained (or not). I would like to get a quaternion from the module representing tilt-compensated rotation from the initial state (power on).
Try this one: GitHub - jremington/ISM330DHCX_fusion: Mahony fusion filter for 6DOF
Drift depends on accuracy of gyro calibration, and the offsets are temperature dependent, so yaw drift will depend rather strongly on temperature.
The accelerometer can correct drift only in pitch and roll.
Thanks. That’s what I was looking for. While I’m waiting for my ISM modules to arrive, I have a couple of ICM_20948, and I’m using your library for that. It’s the only one that has a fairly simple and straightforward calibration routine. I wish Github search would bury the old/obsolete ones and push yours to the top. It looks like I might be able to use a combination of 9DOF fixed to the boat for north reference, and 6DOF on the mast for relative yaw.