> For the complete documentation index, see [llms.txt](https://docs.theseus.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.theseus.us/cyclops/autopilot-integration/non-gps-ekf-initialization-in-ardupilot/ardupilot-patch.md).

# Ardupilot Patch

Github repo: <https://github.com/Theseus-Dev/ardupilot-patches/tree/main>

Patched ArduPlane 4.6.3 that initializes the EKF without GPS, VIO, or optical flow.&#x20;

#### Flash

Grab the firmware for your board from <https://github.com/Theseus-Dev/ardupilot-patches/releases/tag/4.6.3-1>

* arduplane-4.6.3-CubeOrangePlus.apj
* arduplane-4.6.3-MatekH743.apj
* arduplane-4.6.3-CUAV-X7.apj

Load via Mission Planner → Install Firmware → Load custom firmware.

#### Set params

| Parameter     | Value |
| ------------- | ----- |
| EK3\_OPTIONS  | 8     |
| GPS1\_TYPE    | 0     |
| ARSPD\_USE    | 1     |
| ARMING\_CHECK | 0     |

Init sequence (before arm)

1. SET\_GPS\_GLOBAL\_ORIGIN(lat, lon, alt)
2. MAV\_CMD\_DO\_SET\_HOME(lat, lon, alt)
3. MAV\_CMD\_EXTERNAL\_POSITION\_ESTIMATE(lat, lon)
4. MAV\_CMD\_EXTERNAL\_WIND\_ESTIMATE(speed, direction)

We provide a [script to send the proper sequence on ground](https://github.com/Theseus-Dev/ardupilot-patches/tree/main/tools/init)\
Going forward, this will be added to Vozilla, but it is still in development.

In flight, Cyclops will send MAV\_CMD\_EXTERNAL\_POSITION\_ESTIMATE at your cruise cadence.

#### Confirm it worked

STATUSTEXT should print EKF3 IMU0 aiding from external pos and EKF3 IMU0 wind set N=… E=…. GLOBAL\_POSITION\_INT should report your origin, not 0/0.

#### In Flight

You will see a high (red) velocity innovation. This is because nothing is aiding that measurement. You should still be able to fly autonomously with the EKF


---

# 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://docs.theseus.us/cyclops/autopilot-integration/non-gps-ekf-initialization-in-ardupilot/ardupilot-patch.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.
