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
- Connect the flight controller to QGroundControl.
- 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.
- Reboot after changing the port assignment.
- 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
- Secure the module in its final mounting position, away from magnetic interference.
- Confirm the flight controller's own orientation and accelerometer calibration are correct.
- In QGroundControl, open Vehicle Setup → Sensors → Compass and follow the normal calibration sequence, with external compass rotation detection enabled.
- 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:
| Parameter | Direction |
|---|---|
| EKF2_GPS_POS_X | Forward |
| EKF2_GPS_POS_Y | Right |
| EKF2_GPS_POS_Z | Down |
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.