Skip to end of metadata
Go to start of metadata

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.

Software Installation

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.

Required parts

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.

Connecting

Since Zubax GNSS 2 can be powered directly from the bus, the electrical connections are quite simple:

  1. Connect Zubax GNSS 2 with Pixhawk using the appropriate cable. In case you’re using a non-redundant CAN interface (which is the only available option for Pixhawk v1), only CAN1 must be used, leaving CAN2 empty.
  2. Terminate the CAN bus using the termination plug.

Configuring the PX4 flight controller

GPS

Open QGroundControl application.    

  


Connect Pixhawk with a computer using the micro USB cable. (Device will appear in QGroundControl application).


Set the configuration parameter UAVCAN_ENABLE to Only Sensors (2) or Sensors and Motors (3) (or any higher value, if such available)


Save setting. 


Reboot Device.


GPS will may take several seconds to get locked. You can check the status by clicking on button GPS Status.

 


Compass

Note

By default external compass will always be the primary compass.

Calibration

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 ParametersSystem → 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 CAL_MAG_PRIME.


If the autopilot reports issues with high magnetic field offsets, set the parameter mag.scaling_coef on Zubax GNSS to approximately 0.6 and try calibration again

To check status or to troubleshoot the problem you can use MAVLINK console.

MAVLink Console

The MAVLink Console ( Analyze →  Mavlink Console  ) allows you to connect to the PX4 nsh shell and send commands.


Command ? will provide information about available commands.


Command uavcan status will display the status of uavcan and all sensors attached to it.


Command listener sensor_mag will display all compasses attached to the system and their status.


Command sensors status will display the status of all sensors and their priority. As you can see the external compass has the highest priority.


1 Comment

  1. In case there are only two devices on uavcan bus there should be two termination resistors: one on the flight controller and one on the GNSS device.the whole point of termination resistors is to have one on each side of the bus