Hi thanks all to your answers. The radians is a good point, I will take a look.
I see now that the algorithm also expects accelerometer and magnetometer in calibrated units. Do you guys know if I need to do something special there - calibration, conversion for the values from the OpenLog?
I see now that the algorithm also expects accelerometer and magnetometer in calibrated units.
No, the actual units output by the magnetometer and accelerometer are irrelevant. Normalized vectors (magnitude = 1) are fine.
However, the filter algorithm will just output nonsense unless the magnetometer and accelerometer are calibrated properly, with axial offsets removed and relative scale factors normalized. You also need to ensure a right handed coordinate system and MOST IMPORTANTLY that the magnetometer X, Y and Z axes are swapped to agree with the accelerometer X, Y and Z axes (see below, from the IMU datasheet). Example at https://github.com/jremington/LSM9DS1-AHRS