> For the complete documentation index, see [llms.txt](https://agamrobotics.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agamrobotics.gitbook.io/docs/gnss-and-rtk-systems/agam-gnss01-can/setup-instructions.md).

# Setup Instructions

#### Connection Diagram <a href="#connection-diagram" id="connection-diagram"></a>

As shown below, **twist** the provided 4 pin **CAN** cables as this will cancels out electromagnetic interference (noise) and reduces crosstalk by ensuring external fields affect both wires equally. It also helps manage physical aspects like stability, preventing tangles, and ensuring even stress distribution.&#x20;

<figure><img src="/files/nNwPAdCDJO0gdQ1qGWJC" alt=""><figcaption></figcaption></figure>

Connect the cable to CAN1 or CAN2 on the Autopilot and the other side to one of the CAN port on Agam GNSS01.

#### Mounting  <a href="#px4-configuration" id="px4-configuration"></a>

The unique shape of GNSS01 offers a visual cue for orientation of the module without much hassle.

The triangular pointer like shape with Agam Robotics logo pointed forward is the front facing. Both Agam Robotics logo on Autopilot and Agam GNSS01 needs to be pointed forward.

#### PX4 Configuration <a href="#px4-configuration" id="px4-configuration"></a>

1. Connect AgamGNSS0x CAN to the CAN1 or CAN2 port using the provided cable.
2. Enable the parameter [UAVCAN\_ENABLE](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_ENABLE) to `2` or `3`&#x20;
3. Reboot
4. Once enabled, the module will be detected on boot. GPS data should be received at 10Hz.

{% hint style="info" %}
When powered through the Autopilot, AgamGNSS CAN will not boot if there is no SD card.
{% endhint %}

**Sensor Position Configuration**

If the sensor is not centered within the vehicle you will also need to define sensor offsets:

* Enable GPS yaw fusion by setting bit 3 of [EKF2\_GPS\_CTRL](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#EKF2_GPS_CTRL) to true.
* Enable [UAVCAN\_SUB\_GPS](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_SUB_GPS), [UAVCAN\_SUB\_MAG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_SUB_MAG), and [UAVCAN\_SUB\_BARO](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#UAVCAN_SUB_BARO).
* Set [CANNODE\_TERM](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#CANNODE_TERM) to `1` if this is that last node on the CAN bus.
* If AgamGNSS0x is offset from the vehicles Centre of Gravity(CoG), then the parameters [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) and [EKF2\_GPS\_POS\_Z](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#EKF2_GPS_POS_Z) should be set accordingly.

#### Ardupilot Configuration <a href="#px4-configuration" id="px4-configuration"></a>

1. Connect AgamGNSS01 CAN to the CAN1 or CAN2 port using the provided cable.
2. Power the Autopilot/Flight Controller and connect it to Mission Planner
3. Navigate to Config/Tuning > Full Parameter List
4. Set the following parameters:
   * `CAN_D1_PROTOCOL`: Set to `1` to configure CAN1 as DroneCAN
   * `CAN_D2_PROTOCOL`: Set to `1` to configure CAN2 as DroneCAN
   * `CAN_P1_DRIVER`: Set to `1` to enable the CAN1 bus
   * `CAN_P2_DRIVER`: Set to `1` to enable the CAN2 bus
   * `GPS_TYPE`: Set to `9` to select DroneCAN as the communication protocol for GPS1


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://agamrobotics.gitbook.io/docs/gnss-and-rtk-systems/agam-gnss01-can/setup-instructions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
