UBlox GPS + Compass Module¶
The UBlox GPS + Compass module is the most commonly used GPS for ArduPilot compatible flight controllers. There are many versions of these modules available from various manufacturers, the recommended models are here.
ArduPilot automatically configures the GPS soon after startup so there is no need for any GPS related calibration. The compass must be calibrated however.
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.
Details on how to setup and use a 2nd GPS can be found on the GPS Blending page page.
Note
The baud rate is set by the UBlox driver (setting SERIAL4_BAUD = 38
is ignored).
Note
ArduPilot supports up to 3 compasses. However you cannot attach a secondary external compass to Pixhawk because there isn’t a spare port.
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.
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.
Note
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 Erle-Brain2¶
- Connect GPS 6 pin DF13 connector to the port labeled as “UART”
- Connect Compass 4 pin DF13 connector to one of the ports labeled as “I2C”
An external compass is required (drivers are not yet available for the internal compass).
If using Copter 3.3 or higher or recent versions of Plane/Rover then this parameter should also be set:
- SERIAL4_PROTOCOL = 5
Note
The baud rate is set by the UBlox driver (setting
SERIAL4_BAUD = 38
is ignored).
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.
Tip
The recommended orientation is to mount the module with the arrow facing toward the front of the vehicle and in the same direction as the arrow on the autopilot.
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 GPS 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¶
Compass Calibration in Mission Planner explains the simplest way to calibrate a compass mounted in the recommended orientation (arrows for autopilot and compass facing to front of vehicle).
Advanced Compass Setup contains more detailed instructions for calibrating a compass if, for example, it has been mounted at some other orientation.
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.