Skip to main content

PX4

Use this guide with a flight controller running PX4 and a build that includes the IIS2MDC compass driver. Connect the module using the integration guide, including SCL/SDA for the compass. Save your existing parameters before changing settings.

GNSS setup​

  1. Connect the flight controller to QGroundControl.
  2. Open the parameter editor and set GPS_1_CONFIG to the serial port physically connected to this module. Use the controller's port mapping; a connector label is not necessarily the same as a parameter value.
  3. Reboot after changing the port assignment.
  4. With the antenna facing a clear sky view, confirm that GNSS data, satellites, and fix status appear in QGroundControl.

If GNSS works but the compass is absent, check the SCL/SDA wiring and confirm that your PX4 build includes and starts the IIS2MDC driver. Older builds may require a firmware update that includes the IIS2MDC startup fix for compass detection.

Compass orientation and calibration​

  1. Secure the module in its final mounting position, away from magnetic interference.
  2. Confirm the flight controller's own orientation and accelerometer calibration are correct.
  3. In QGroundControl, open Vehicle Setup → Sensors → Compass and follow the normal calibration sequence, with external compass rotation detection enabled.
  4. Check the detected external compass orientation and verify that heading follows the vehicle as it turns. Check again while tilting the vehicle; a level-only check can miss an incorrect rotation.

PX4's normal calibration detects external compass orientation. Verify the detected rotation for your installed mounting position. Use the PX4 orientation guide if a manual correction is needed.

GNSS position offset​

If the receiver is offset from the vehicle's center of gravity, enter the measured offsets in meters:

ParameterDirection
EKF2_GPS_POS_XForward
EKF2_GPS_POS_YRight
EKF2_GPS_POS_ZDown

Use signed values for the installed location. See the PX4 parameter reference for the definitions used by your release.

Final checks​

Confirm a valid GNSS fix, a detected and calibrated external compass, and correct heading response before using navigation modes. Resolve sensor or heading errors in QGroundControl first.

Further reading: PX4 compass calibration.