The magnetometer on my device has different scale and offset on its axes.This is because of influence of hard iron on the board. So, it needs to be calibrated. I've read this manual and hadn't understood about rotated ellipsoid. Rotated about what?
I made calculations according this manual with matlab. Offsets and gains are adequate, but rotation matrix is strange. When I fit the data with offsets and gains, the angles (yaw, pitch, roll) I computed are normal. When I fit with offsets, rotation matrix and gains, the angles are strange.
The second question. When I fit the data with normal calibration values all vectors have magnitude 1. How to convert it back to gauss?