UAS at UCLA, Using PX4 on Hex Cube Orange

We are UAS at UCLA, a group of 35+ hardworking UCLA students currently competing in the First Responders Challenge. The First Responders Challenge is a competition where groups draft proposals and build systems for long endurance unmanned aerial systems to be used by first responders as communication stations. We are so grateful to have the support of CubePilot for our hybrid gas and electric drone submission, it is essential that our drone maintains an extremely accurate position to act as an effective way station, making both the Cube Orange and RTK GNSS systems extremely useful for our application. Below I give instructions on how we used the Cube Orange and RTK system setup with PX4, as while there is a lot of documentation for using it with ArduPilot, we found it more difficult to find instructions for PX4 usage.

The following instructions were performed on a Linux machine running Ubuntu 20.04, some small changes in commands may be necessary when running with different linux distributions/package managers.

*The RTK system originally would sporadically go undetected when using PX4, after updating to the latest version we noticed that this issue seemed to disappear. If you notice this problem make sure that you are running the latest firmware version.

Download PX4 from the source repository:

git clone

Ensure that you have installed the proper build tools (cmake and ninja), just using cmake led to a slow build. Install ninja using:

apt-get install ninja-build

Now compile PX4 for the HEX Cube Orange with the command:

make cubepilot_cubeorange

Then deploy to the cube (connected over USB) using:

make cubepilot_cubeorange upload

After plugging in the RTK system and the hex cube you will need to configure the proper parameters for the GPS to be detected.

UAVCAN_ENABLE = 2 (Sensors Automatic)

GPS_1_CONFIG = 0 (Disabled)

Restart the FCU and you should notice the device is now detected; hopefully everything should be working at this point.

Below is a video of a test drone (not our competition submission drone as this has yet to be fully fabricated) following waypoints using PX4, the Hex Cube Orange and Here3 RTK GNSS to validate the system.



Follow our progress on our website:


Hi David and team,
I’m a fellow student at Virginia Tech and we’re using PX4, Here3, and Cube Orange for UAS research. The Hex documentation shows the Here3 does not currently support RTK GPS over CAN, but it seems you solved that. Can you confirm that you did get RTK GPS (float) or (fixed) with the Here3 connected via CAN?

When we made this post it did seem as if rtk was working, we later discovered that many of the uav can packets would drop so we were usually losing Rtk lock. We spent many months trying to fix this in the px4 firmware but unfortunately didn’t resolve the issue. As of now we are not using rtk as we couldn’t get it to work reliably.