> ## Documentation Index
> Fetch the complete documentation index at: https://docs.czautoz.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Autopilot

> Press P in the pilot seat to open the destination map - pick a point and the helicopter flies itself there like a pilot at the controls. Landing stays manual unless the server enables auto-land.

The Autopilot flies the helicopter to a destination you pick on a map — climbing, turning and cruising like a pilot at the controls, at that aircraft's own configured performance. It is a separate system from [Autohover](/features/autopilot): Autohover holds you still, Autopilot takes you somewhere.

## Using it

1. In the **pilot seat**, press **`P`** — the destination map opens (drag the header to move it, drag the corner to resize; it remembers your size and position)
2. **Click the map** to set a destination — your position and the destination are marked, with the distance shown
3. Press **ENGAGE** — the helicopter announces the distance and flies itself there
4. On arrival it hands over to **Autohover** and holds position — **landing stays manual** (unless the server enables [auto-land](#auto-land))

<Note>
  Engaging needs the **engine running** and the aircraft **airborne**. With the server's [auto take-off](#server-configuration) setting on, neither is required — engaged on the pad, the autopilot starts the engine itself, waits for full rotor speed, lifts off and flies the whole departure.
</Note>

## How it flies

* **Like a pilot, per aircraft.** It turns nose-first and banks into turns, and cruises at a speed derived from that helicopter's own `flight.maxAirspeed` — up to 80% of it, or 95% of that aircraft's `flight.envelopeThreshold` where that works out lower, which at the default threshold of `0.80` gives about **76%**. It turns at a rate matched to its tail authority, never pushes into the aircraft's speed envelope, eases off for a climb, and slows down when carrying a sling load — exactly the limits a human pilot lives with
* **Terrain and obstacle aware.** It continuously reads the ground along the route and holds a safe height over the highest terrain ahead, plus clearance over scanned obstacles — trees, buildings, rocks and vehicles on the flight path raise the cruise line before you reach them
* **Climbs out first.** Engaged low — in a clearing, next to trees — it climbs essentially straight up onto its safety line before moving off
* **Eases off on approach** — a gentle nose-up flare bleeds the speed away, and the hover hold takes over at the destination

## Cancelling — you are always in command

| Action                       | Result                                                                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **Touch any flight control** | Autopilot cancels instantly — you have the aircraft. If Autohover was on before you engaged, it stays on                              |
| **STOP** (in the `P` map)    | Autopilot cancels; Autohover holds position where you are                                                                             |
| **`X`** (Autohover toggle)   | Turning Autohover **on** mid-flight cancels the autopilot and holds; turning it **off** mid-autopilot drops everything to full manual |

While the map is open your mouse operates the map — it never steers the aircraft or touches the engine, and the autopilot cannot be accidentally cancelled from inside the map.

<Note>
  **Autohover and Autopilot are independent.** Engaging the autopilot does not switch Autohover on — your hover state stays exactly as you set it. They only meet at the hand-off: arrival (and STOP) put the aircraft into an Autohover hold so it stays put while you land it.
</Note>

## Auto-land

With `features.autoPilotAutoLand` enabled, the autopilot completes the last step itself. About a kilometre out it starts sizing up the ground around your destination — the same clear-of-objects, flat, dry-with-margin site check the abandoned-landing system uses — so in the normal case the landing site is chosen while still inbound and the arrival is **one continuous approach**: a straight descending line to the pad, slowing on final, settling level and touching down positively, with the engine left **running** as it hands you the controls. If there is no safe ground near the destination (dense forest, town centre, water) it holds hover and tells you to land manually. Every cancel above works mid-auto-land too.

## Server configuration

| Setting                         | What it does                                                                                                                                                                                                                                                                                                                                | Default |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `features.autoPilotEnabled`     | `1` = all pilots can use the autopilot. `0` = disabled for everyone — `P` reports it is off. Shown in the Admin Panel as **Auto Pilot (map destination)**.                                                                                                                                                                                  | `1`     |
| `features.autoPilotAutoLand`    | `1` = the autopilot lands at the destination where safe, engine left running. `0` = arrival holds hover; landing is manual. Shown in the Admin Panel as **Auto Pilot Lands At Destination**.                                                                                                                                                | `0`     |
| `features.autoPilotAutoTakeOff` | `1` = the autopilot flies the whole departure — engaged on the pad it starts the engine if needed, waits for full rotor speed, lifts off and climbs out itself. `0` = engaging from the ground is refused; the aircraft must already be airborne with the engine running. Shown in the Admin Panel as **Auto Pilot Takes Off From Ground**. | `0`     |

Both settings are added to existing configs automatically and can be toggled live from the Admin Panel.
