Normalized on-board magnetometer measurements compound of x,y,z components are taken for an orientation estimation are re-calculated using two calibration matrices:
where:
c11..c33 are misalignment compensation matrix elements
b11..b33 are bias compensation matrix elements
ΔT is a temerature between acutal operation temperature and reference temperature of 25 °C.
Both matrices can be retrieved from the device using GET_MAG_CALIB message and can be changed by sending new values with SET_MAG_CALIB message.