PX4 supports various magnetometers. But it is difficult to find information about what motivated the selection of sensors for different Pixhawk boards.
So I decided to find out more about the differences myself.
In particular, I tested the thermal behavior of different mags. This was a concern because I had heard people reporting bad behavior in changing temperatures for certain mags, in particular the ST LIS3MDL.
MPU9250 (mRo PixRacer onboard, EOL)
LIS3MDL (mRo PixRacer onboard)
QMC5883 (on a breakout board from Aliexpress)
BMM150 (on a Bosh shuttle-board)
RM3100 (from Drotek)
IST3810 (on a GPS/mag board from Aliexpress)
All mags were mounted on a board with a PixRacer and placed in the refrigerator to cool down.
Then they were placed in a turned-off oven that had been pre-heated to 85 deg C. Unfortunately the oven’s fan was still running in the first part of the experiment, creating noise in the measurement. However the temperature-related trend is much lower frequency than the EMI noise and still clearly visible.
All mags are uncalibrated and oriented arbitrarily with respect to each other. In the plots below, the X, Y, and Z axes are plotted in groups simply to avoid over-crowded plots.
Magnetic field vs time
Magnetic field vs temperature
By doing a 1st order fit of the magnetic field vs temperature, we can see which sensor has the biggest temperature correlation.
Clearly, the MPU9250 has the most significant temperature correlation and the RM3100 the least. The other sensors are comparable and the LIS3MDL does not perform particularly badly, despite anecdotal reports.
The log file is here.
If you have any other tests or insight that you can share, please do.