Some time ago I've succesfuly used lsm9ds0 (SparkFun) for 3D magnetic field readings. Today I'm trying to upgrade my device to use lis3mdl (MinIMU-9 v5 Gyro) but the magnetometer output is different than lsm and I don't know how to interpret it. It seems that X and Y axis woks simillar to lsm (positive and negative readings dependent on imu position) but the Z is always positive (eg 1500-4500 raw @ +/-4 gauss ) which I don't understand.
I've used config from AN4602:
I assumed that the magnetic field of measurement would be the same on lms9ds0 and lis3mdl but It seems that it's not or Am I doing something wrong?