3DR UBlox GPS + Compass Module

This page covers the installation of the 3DR UBlox GPS + Compass module


The 3DR UBlox GPS + Compass module is the recommended GPS for Pixhawk, PX4 and APM2.6 (and above) flight controllers using Plane, Rover and Copter.  These come set-up with the best known GPS configuration and have been thoroughly tested by thousands of users.


Connecting the Autopilot

Connecting to Pixhawk

Connect the GPS’s 6-pin DF13 connector to the Pixhawk’s “GPS” port and the compass’s 4-pin connector to the I2C port.  Alternatively the compass can be first connected through an I2C splitter if other I2C devices are to be attached.

As of Copter 3.2 and recent versions of Plane and Rover, a secondary GPS can be connected to the Pixhawk’s Serial 4/5 port.  Limited testing suggests that a secondary GPS can reduce the likelihood that GPS glitches will affect the vehicle but can also lead to sudden movements of the vehicle when the primary GPS switches.

If the parameters are set-up as shown below, the flight controller will use the GPS with the higher number of satellites (Note: it will switch when one GPS has at least 2 more satellites than the other).

  • GPS_TYPE2 = 1

And if using Copter 3.3 or higher or recent versions of Plane/Rover then these parameters should also be set:

  • SERIAL4_BAUD = 38


Note that a secondary external compass cannot be attached.

Connecting to APM 2.x

APM 2.6 is compatible with the 3DR UBlox GPS + Compass module.

To connect the GPS module to APM 2.6, attach the GPS port to the APM GPS port using the included 5-position-to-6-position cable (use the top-entry port, not the side-entry port), and attach the GPS MAG port to the APM I2C port using the included 4-position cable.

Connect GPS to APM 2.6.

APM 2.5 and APM 2.0 have an internal compass (unlike APM 2.6) which must be disabled by cutting a trace before you can connect the 3DR UBlox GPS + Compass module (the video here shows how).

Other than disabling the internal compass, connecting the UBlox is the same for APM2.0/APM2.5 as for APM2.6.

After connecting the external compass you will need to re-calibrate the compass including Compassmot (if you had run this procedure for the internal compass).

Connecting to PX4

  • To connect GPS part of the this module to PX4, connect the GPS port to the PX4FMU’s GPS connector.
  • Connect the compass lead on the module to the PX4IO’s I2C port.
  • The PX4IO board I2C port is the 4 pin connector located on the board side opposite the Servo Out connectors in the second row of connectors in and next to the board mounting hole.
  • When the external compass is plugged into the PX4IO boards I2C port, it is automatically detected and used and the internal compass is disabled.

PX4IO I2C port

Next connect with the Mission Planner and go to INITIAL SETUP | Mandatory Hardware | Compass and set the Orientation to ROTATION_ROLL_180.

Mounting the GPS Module

This module permits the GPS to be mounted separately from the flight control module so that it can have the best clear (view) of the sky and allows the compass to be distanced from interfering magnetic fields. When mounting the GPS+Compass module:

  • Place the module on the outside of your vehicle (in an elevated position if appropriate) with a clear view of the sky, as far as possible from the motors and ESCs, with the arrow facing forward.
  • Distance the module from DC power wiring and the batteries by at least 10cm.  Use of a mast is highly recommended.
  • Place the module clear of nearby iron containing metallic objects. (Use nylon or non magnetic stainless steel hardware and nylon or aluminum standoffs to mount the module).
  • Twist power and ground wires where possible.


Setup in Mission Planner

Start Mission Planner, connect your autopilot, and select the “Connect” tab. Select the “Initial Setup” tab, then select the left menu “Mandatory Hardware” tab and select the “Compass” tab.

Select the option to Enable the compass and to allow Auto Dec. To manually input the declination, select Declination Website and enter the magnetic declination minutes and seconds for your location.

Next select your autopilot configuration, for Pixhawk and PX4, select the option Pixhawk/PX4 with the image of the Pixhawk. For APM 2.6, select APM with External Compass with the image of the GPS with Compass module. These options will automatically enter the correct orientation for the board. Ensure that you have mounted the GPS with Compass with the arrow facing toward the front of the vehicle and in the same direction as the arrow on the autopilot.

calibrate compass

To input a manual orientation for APM, select the Manual option at the bottom of the screen, and consider the following factors when selecting an orientation. Note: The information below does not apply to Pixhawk and PX4; for these autopilots, select the Pixhawk/PX4 option to assign the correct orientation.

  • If the GPS / compass board is mounted in its correct direction (arrow pointing forward) and the Flight controller board is also mounted right side up with its arrow pointing forward, the (COMPASS_ORIENT) parameter will need to be set to (Roll 180) or “8” because the compass is upside down under the GPS modules antenna.
  • If the Flight controller board is put in an alternate orientation, the Orientation (i.e. COMPASS_ORIENT parameter) should be set according to the gps’s attitude to the flight controller.  So for example if both the Flight controller and the GPS+compass module were mounted on the bottom of the vehicle (a ridiculous example) then you would leave the Compass orientation as ROTATION_ROLL_180.  If however you wanted to mount the GPS+Compass right-side-up you would pick Orientation “ROTATION_NONE” because the original rotation was Roll 180, then you add the compass rotation which is another roll 180 = Roll 360 = no rotation.

LED Indicators

The 3DR GPS+Compass module has two LED indicators: one for power (solid red) and one for GPS lock (flashing blue).

LEDs: Behavior:
Power Solid red when powered
GPS lock Flashing blue when 3D GPS lock acquired

Advanced Configuration

Advanced configuration of the UBlox GPS’s internal settings is documented in UBlox GPS Configuration.

Questions, issues, and suggestions about this page can be raised on the APM Forum. Issues and suggestions may be posted on the forums or the Github Issue Tracker.