> 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/ardupilot/cyclops-v1.x.x/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
