Page tree
Skip to end of metadata
Go to start of metadata

This tutorial shows how to connect and use Zubax GNSS 2 with ArduPilot-based autopilots.

Documentation may be outdated

At the time of writing this, ArduPilot was undergoing a major redesign of its CAN bus subsystem. This means that the instructions provided here may have become outdated. Please check the ArduPilot documentation for updated instructions before reading this further.

Required parts

Aside from Zubax GNSS 2 itself and the autopilot it will be connected to, the following parts will be needed:

  • UAVCAN Micro patch cable (or an adapter cable, depending on the type of CAN connectors used in the autopilot hardware).
  • UAVCAN Micro termination plug.

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.

Configuring Zubax GNSS 2

Zubax GNSS 2 can be configured either via UAVCAN or via the USB command-line interface.

Via UAVCAN

This method requires that you have a CAN adapter connected to your computer.

Install the UAVCAN GUI Tool on your PC, then perform the following steps:

  1. Launch the application and connect to the correct CAN bus interface. Configure the bit rate at 1 Mbps, unless you have other specific requirements.
  2. Enable the dynamic node ID allocation server in the GUI Tool.
  3. Wait for Zubax GNSS 2 to become online.
  4. Set the configuration parameter uavcan.node_id to an arbitrary integer value, except 1 (the node ID 1 is used by the autopilot).
  5. Reboot Zubax GNSS 2 by sending a reboot request from the GUI Tool.

Via USB CLI

If you prefer CLI, you will need to connect Zubax GNSS 2 to your PC using a USB cable. Read the article about the serial command line interface (Serial CLI) for more information on how to use it.

Once connected, configure the same parameters as if you were using the GUI tool via the CLI.

Configuring ArduPilot

The following chapters assume that Mission Planner is installed on the user’s computer, and that the autopilot is otherwise properly configured.

Remember that it may be necessary to restart the autopilot before the changes take full effect.

Enabling UAVCAN in APM

Open Mission Planner, navigate to the tab CONFIG/TUNING, and set the parameter BRD_CAN_ENABLE to 2.

GPS

In order to make ArduPilot receive measurements from an UAVCAN-interfaced GNSS receiver, set the parameter GPS_TYPE to 9

Compass

In order to make ArduPilot receive measurements from an UAVCAN-interfaced compass, open the tab INITIAL SETUP, then select Mandatory HardwareCompass. Find the compass that is marked with the check Externally mounted, and make sure that it is selected in the drop-down field Primary Compass. See the screenshot below for an example.

You may need to select a different rotation if the arrow printed on Zubax GNSS 2 is not aligned with the vehicle’s longitudinal axis.

Don’t forget to perform compass calibration when done. If the autopilot reports issues with high magnetic field offsets, set the parameter mag.scaling_coef to approximately 0.6 and try calibration again.

Barometer

Set the configuration parameter GND_PRIMARY to 1. Make sure that the barometer is enabled on Zubax GNSS 2.

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.