Disabling mag (compass)

I want to avoid magnetic by disabling mag (compass).

After setting the parameter CAL_MAG0_ID to ‘0’ (reset to default) in QGC and reconnected, but the compass value is displayed as below image.

I want to know the compass is operating or not.

In addition, I removed the magnometerCheck function in PreflightCheck.cpp, but the the error message is displayed (“Unable to takeoff, vehicle position not know.”)

Please let me know about this problem.

Hi
Did you find any solution to this?
I want to disable my compass as well

Individual sensor enable/disable was implemented in v1.7. If you are using a previous version, I suppose that there is no straightforward solution.

You can try out v1.7.3 and then set params CAL_MAGX_EN to 0. This should disable your magnetometers.

However, please note that EKF requires at least IMU data, a source of yaw (magnetometer or external vision) and a source of height data to work properly (see https://dev.px4.io/en/tutorials/tuning_the_ecl_ekf.html).

1 Like