Hello, I'm writing to you regarding a comment on this post some time ago: LSM303DLHC - Calibration, Pitch, Roll and Tilt Compensated Heading - #7 by jremington.
I'm trying to calibrate my sensor (BNO085, I know that it probably still won't work and I will have to use ISM330DHCX and MMC5983MA with the magneto program but I want to try it). I'm wondering about this part of the manually calibration code:
// shift and scale magnetometer data
m.x = (m.x - m_min.x) / (m_max.x - m_min.x) * 2 - 1.0;
m.y = (m.y - m_min.y) / (m_max.y - m_min.y) * 2 - 1.0;
m.z = (m.z - m_min.z) / (m_max.z - m_min.z) * 2 - 1.0;
// same for accelerometer. Should also consider offsets and scale here...
a.x /= 16384.;
a.y /= 16384.;
a.z /= 16384.;
Why are you dividing the accelerometer values by 16384? From what I understood, the same actions should be taken here as with the values from the magnetometer.
I plan to test direct, automatically calibrated readings from this sensor, raw readings and manual calibration (as in the code you provided: smallest and largest values) and third manner is using a magneto to calibration with raw readings too. If they are still weak, I plan to use the previously mentioned ISM330DHCX and MMC5983MA sensors or use GPS. I want to determine the current course of a remotely controlled boat.
Unfortunately, thread with this shubject had to be closed, which is why I'm writing to you here.