> For the complete documentation index, see [llms.txt](https://docs.arkelectron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkelectron.com/products/gps/ark-g5-rtk-gps/px4-instructions.md).

# PX4 Instructions

## Single GPS Configuration

Connect the ARK G5 RTK GPS to the flight controller's CAN port using a standard 4-pin JST-GH cable.

### Flight Controller Parameters

Set the following in *QGroundControl* and reboot the flight controller.

#### Required

| Parameter                                                                                               | Value | Description                                     |
| ------------------------------------------------------------------------------------------------------- | ----- | ----------------------------------------------- |
| [UAVCAN\_ENABLE](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_ENABLE)    | 2     | Enable DroneCAN with dynamic node allocation    |
| [UAVCAN\_SUB\_GPS](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_SUB_GPS) | 1     | Subscribe to DroneCAN GPS messages              |
| [UAVCAN\_SUB\_MAG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_SUB_MAG) | 1     | Subscribe to DroneCAN magnetometer messages     |
| [EKF2\_GPS\_CTRL](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#EKF2_GPS_CTRL)   | 7     | Enable GPS fusion (lon/lat + alt + 3D velocity) |

#### Optional

| Parameter                                                                                                                                                                                                                                                                                                                      | Description                                            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| [UAVCAN\_SUB\_BARO](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_SUB_BARO)                                                                                                                                                                                                                      | Set to `1` to subscribe to DroneCAN barometer messages |
| [UAVCAN\_SUB\_IMU](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_SUB_IMU)                                                                                                                                                                                                                        | Set to `1` to subscribe to DroneCAN `RawIMU` messages. |
| [EKF2\_GPS\_POS\_X](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#EKF2_GPS_POS_X) / [EKF2\_GPS\_POS\_Y](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#EKF2_GPS_POS_Y) / [EKF2\_GPS\_POS\_Z](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#EKF2_GPS_POS_Z) | GPS offset from the vehicle center of gravity (meters) |

### CAN Node Parameters

The node publishes GPS, magnetometer and barometer data with its default parameters. To terminate the bus, fix the node ID, publish IMU data or change the receiver's output rate, PVT modes or dynamics model, see [Node Parameters](/products/gps/ark-g5-rtk-gps/firmware.md#node-parameters).

{% hint style="info" %}
The ANT2 connector is not active on the P3. For dual antenna heading from one unit, see the [ARK G5 RTK Heading GPS](/products/gps/ark-g5-rtk-heading-gps/px4-instructions.md#dual-antenna-heading-configuration) (P3H, P6, P8).
{% endhint %}

***

## Moving Base Heading Configuration

Two ARK G5 RTK GPS units give heading from the baseline between their antennas: the moving base sends its corrections to the rover over CAN, and the rover reports the heading. Mount the antennas at least 30 cm apart.

### CAN Node Parameters

| Parameter         | Moving base | Rover         |
| ----------------- | ----------- | ------------- |
| `SEP_MODE`        | `1`         | `2`           |
| `CANNODE_PUB_MBD` | `1`         | —             |
| `CANNODE_SUB_MBD` | —           | `1` (default) |

### Flight Controller Parameters

Apply the [Single GPS Configuration](#single-gps-configuration) flight controller parameters above, plus `UAVCAN_SUB_GPS_R` `1` and `EKF2_GPS_CTRL` `15`, then set where the antennas are mounted:

| PX4 version       | Parameters                                                                                                                                                              |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| v1.18 and earlier | `EKF2_GPS_YAW_OFF`: clockwise angle in degrees from the vehicle forward axis to the baseline from the moving base's antenna to the rover's                              |
| `main`            | `SENS_GNSSn_ID` and `SENS_GNSSn_OFFX/Y/Z` (antenna position, meters in the body frame) for both units, and `SENS_GNSSn_HDG` `1` (Moving base rover) in the rover's slot |

***

## Troubleshooting

* See our [GPS Placement](/knowledge-base/knowledge-base/gps-placement.md) guide for mounting best practices, interference sources, and antenna positioning.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.arkelectron.com/products/gps/ark-g5-rtk-gps/px4-instructions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
