This tutorial demonstrates how to use Zubax GNSS 2 with PX4-based flight controllers. The version of PX4 firmware involved in this tutorial is v1.10.1. The documentation for PX4 is available at px4.io.
QGroundControl provides full flight control and vehicle setup for PX4 or ArduPilot powered vehicles. It provides easy and straightforward usage for beginners, while still delivering high end feature support for experienced users.
To download and install software please refer to the relevant documentation for details.
Aside from Zubax GNSS 2 itself and the autopilot it will be connected to, the following parts will be needed:
Please contact your supplier for ordering information. Alternatively, customers can choose to manufacture the needed cables/plugs on their own in order to suit some custom needs, in which case they should refer to the relevant documentation for details.
Since Zubax GNSS 2 can be powered directly from the bus, the electrical connections are quite simple:
Open QGroundControl application.
Connect Pixhawk with a computer using the micro USB cable. (Device will appear in QGroundControl application).
Set the configuration parameter
Only Sensors (2) or
Sensors and Motors (3) (or any higher value, if such available)
GPS will may take several seconds to get locked. You can check the status by clicking on button
By default external compass will always be the primary compass.
Before starting calibration make sure Zubax GNSS and PX4 are aligned (use arrow markings) as shown below.
For calibration please refer to the relevant documentation for details.
After calibration go to
System Calibration. It will appear that three compasses have calibrated. Two compasses (internal mag) are on PX4 and one compass (no rotation) is on the GNSS module.
By default external compass will be your primary compass. If not please copy the value from the
CAL_MAGX_ID parameter to
If the autopilot reports issues with high magnetic field offsets, set the parameter
To check status or to troubleshoot the problem you can use MAVLINK console.
By default, an external barometer will be the primary barometer. All we have to do is to enable a barometer on GNSS.
Zubax GNSS is equipped with a command-line interface (CLI) exposed over a serial port that provides access to the device’s internal command shell. Refer to the relevant documentation for details.
To use command-line interface attach GNSS to computer using a USB interface.
GNSS will appear as COM port.
Open COM port under the following configurations.
Command-line interface parameters:
Execute the following:
To debug or to check the status of barometer you can use Mavlink console.
The MAVLink Console (
Mavlink Console ) allows you to connect to the PX4 nsh shell and send commands.
? will provide information about available commands.
uavcan status will display the status of uavcan and all sensors attached to it.
listener sensor_mag will display all compasses attached to the system and their status.
listener sensor_baro will display all barometers attached to the system and their status.
sensors status will display the status of all sensors and their priority. As you can see the external compass has the highest priority.