SCALED_IMU2 missing magnetic field data

Hello,

We are experiencing a case where the magnetic field data (xmag, ymax, zmag) in the message SCALED_IMU2 is always zero. We have accelerometer and gyro data in SCALED_IMU2. Furthermore, we also have magnetic field data in the message RAW_IMU. So the measurements seem to be there, but somehow it’s not relayed correctly to SCALED_IMU2.

Has anybody else experienced a similar problem, and are there any ideas of what to be done? Alternatively, is anybody familiar with the units of the magnetic field in RAW_IMU?

We are running the old Pixhawk with ArduSub 4.1.0.

Herman

Hi @Herman, welcome to the forum :slight_smile:

This comment should hopefully clear up your confusion.

The behaviour of what data ends up in which message is something I’ve only recently started looking into in more detail, and is an area of documentation we (and the entire ArduPilot group of firmwares) could stand to improve.

Thanks @EliotBR :slightly_smiling_face:

Thats the info I was looking for. SCALED_IMU2 and RAW_IMU uses different sensors, which explain why there is no magnetic field data in SCALED_IMU2. I’ll likely be able to identify the unit for magnetic field in RAW_IMU and use this data.

1 Like