> 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/ekf-spoof.md).

# EKF spoof

With Cyclops successfully integrated, your drone will initially appear at coordinate 0 N 0 E on your GCS. This is because the EKF will only initialize if a position is injected on the ground. To initialize the EKF, Cyclops has a built-in spoof mapped to your RC.

## Setup

By default, the spoof is configured to run when RC6 on your controller is toggled. If you already have channel 6 mapped to a switch, ensure it is not being used for another function by setting RC6\_OPTION to 0 in your ArduPilot params.

## Procedure

You must run the spoof procedure to initialize Cyclops before each launch. In simple terms, the spoof procedure is as follows:

**BEGIN SPOOF -> ARM -> SPOOF ENDS -> LAUNCH**

{% stepper %}
{% step %}

### Power on and timesync

Place your drone on the ground at the launch point. Power the drone on. Wait until Cyclops has timesynced with the flight controller:

```
SRC=1/191:CYCLOPS: TS/CLK 1:1 SYNCING
SRC=1/191:CYCLOPS: HOME POSITION LOADED
SRC=1/191:CYCLOPS: TS/CLK 1:1 SYNCED
```

{% endstep %}

{% step %}

### Begin the Spoof

Flip the switch mapped to RC6. On your GCS, you will see the following message:

```
SRC=1/191:VPS HOME SPOOF ACTIVE
EKF3 IMU ORIGIN SET
GPS 2:DETECTED MAV
FIELD ELEVATION SET: (x)M 
```

It is normal to see additional messages as the EKF initializes. You will see your drone jump to the home point after a few seconds.

{% hint style="info" %}
The position may return to 0 N 0 E after the spoof ends but before launch. This is normal; the position will update once Cyclops reaches 20m AGL.
{% endhint %}
{% endstep %}

{% step %}

### Arm the Drone

The spoof will run for 15 seconds. While the spoof is active, **arm the drone** on the ground. **Do not take off until you see this message**:

```
SRC=1/191:VPS HOME SPOOF ENDED
```

{% hint style="info" %}
It is best to arm the drone while the spoof is active, as arming can reset the altitude and cause the system to produce bad altitude readings.
{% endhint %}

{% hint style="warning" %}
Do not move the drone while the spoof is active. This can cause EKF invariance.
{% endhint %}
{% endstep %}

{% step %}

### Launch

**After the spoof ends,** launch your drone. Cyclops Visual Navigation will begin at 20m AGL, and the position will update on the GCS. Map Match relocalizations will be sent above 80m AGL.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
You understand how run the spoof for EKF initialization.
{% endhint %}
