> For the complete documentation index, see [llms.txt](https://docs.auterion.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.auterion.com/vehicle-operation/auterion-mission-control/fly/multi-vehicle-operations.md).

# Swarming

Fly several drones as one swarm from AMC, using the Nemyx swarm engine.

Auterion Mission Control (AMC) can command a group of drones as one swarm through the Nemyx swarm engine. Every swarm command goes to all drones of the swarm at once: one drone leads, and the others follow it in formation.

## Before you start

#### Prerequisites

* A Nemyx swarm engine that the AMC computer can reach. By default AMC looks for it at `http://10.41.20.1:18080`, through the ground radio box, so the radio box must be cabled to the AMC computer.
* All drones paired to the same swarm key. See [Pairing drones into a swarm](#pairing-drones-into-a-swarm).
* AMC connected to every drone of the swarm.
* This AMC is the pilot of the vehicles. Swarm commands are refused otherwise (*Action not allowed: User is not pilot*).

{% hint style="info" %}
There is no switch to turn swarming on. AMC checks the engine every second, and shows the swarm controls whenever the engine answers. If the engine stops answering for about three seconds, AMC goes back to the normal single-vehicle controls.
{% endhint %}

## Configuring the engine connection

The engine connection is set in **Settings → General → Connectivity → Nemyx engine**.

| Setting          | Description                                                                                                                                                                               |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Local engine** | Connect to an engine running on this computer, for example for a simulator. When on, AMC uses `http://localhost:18080`. When off, AMC uses the default address `http://10.41.20.1:18080`. |
| **Engine URL**   | Shows the engine address currently in use. It cannot be edited here.                                                                                                                      |

{% hint style="warning" %}
Changing the engine address resets the swarm in AMC: everything the previous engine reported is cleared until the new engine answers.
{% endhint %}

## Pairing drones into a swarm

Drones of a swarm share one radio key. Swarms are managed in the pairing window.

1. Select **Pair** in the top toolbar. The **Pair a new drone** window opens.
2. Set **Mode** to **Normal**. *Repeater mode cannot be combined with a swarm.*
3. Set **Key source** to **Swarm**.
4. In **Swarm**, select the swarm to pair the drones to. To create one, select **Manage**, then **Add**, then **Done**. New swarms are named *Swarm 1*, *Swarm 2* and so on.
5. Selecting a swarm writes its key to the radio (*Key written to the radio.*).
6. Point the camera of the first drone at the **Config QR** code. The drone receives the next free system ID, reboots to apply it (*Rebooting the drone to apply its system ID...*) and connects (*Pairing succeeded — drone N connected*).
7. Repeat for every drone. The window stays open so you can pair the next one.

{% hint style="info" %}
Swarm names and keys are stored only on this AMC computer.
{% endhint %}

The **Current configuration** panel shows the **Radio key**, **Drone key**, **Preset** (*Swarm* while pairing a swarm) and **System ID**. **Reset radio key** removes the key from the radio, after which paired drones can no longer reach it.

## Swarm in the Fly View

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fx9Y2iXtoS3AKEixNIcLt%2Fswarm-flight-tools.png?alt=media&amp;token=a5dfd909-f072-4e0c-9c50-32f4ce3809eb" alt="The Flight tools button with the swarm icon" width="182"><figcaption><p>Flight tools button in swarming mode</p></figcaption></figure>

If the **Flight tools** button shows the swarm icon, AMC is in swarming mode: the swarm engine is reachable, and the controls below command the whole swarm.

While the swarm engine is reachable, the Fly View changes:

* **Left tool strip:** **Takeoff**, **Land** and **Hold** replace the single-vehicle buttons.
* **Flight tools:** the Flight tools button shows a swarm icon and opens the swarm flight tools: **Goto**, **POI**, **Group**, **Rally Point**, **Formation** and **Strike All**.
* **Vehicle selector bar:** when more than one drone is connected, a bar at the top shows the number of vehicles and a card for each drone. See [Vehicle cards](#vehicle-cards).
* **Missions:** Start Mission, Continue Mission and Resume Mission are not available.
* **Map:** the rally point of every drone is drawn, not only that of the selected vehicle.
* **Confirmation:** swarm commands open a confirmation panel titled *Swarm* followed by the command, for example *Swarm Takeoff*.

### Vehicle cards

The vehicle selector bar at the top of the Fly View shows the number of drones in the swarm and a card for each drone. Each card shows the drone's system ID, its battery and its state at a glance.

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FNpIAEOtsAsbJBu68M5wd%2Fswarm-bar-in-flight.png?alt=media&amp;token=b18df566-44ae-4171-9fb0-ad72a11fd99c" alt="Vehicle selector bar with five drones: drone 2 selected, drone 3 tracking, drone 4 with a health caution, drone 5 with a low battery" width="453"><figcaption><p>Drone 2 selected, drone 3 tracking a target, drone 4 with a health caution, drone 5 with a low battery.</p></figcaption></figure>

* **Tap** a card to select its drone. Only the pilot can change the selection.

<table><thead><tr><th width="120">Card</th><th width="160">State</th><th>Meaning</th></tr></thead><tbody><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FGCA4eszyAp4eWBsDkdw8%2Fswarm-card-normal.png?alt=media&amp;token=78bcd89f-0a9d-4526-b021-53417582a8c1" alt="Card of a connected, healthy drone" data-size="original"></td><td><strong>Normal</strong></td><td>The drone is connected and healthy. The four cells show the battery, one cell per 25 % remaining.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FfWzOJy8Ex5KIA5LNK3UH%2Fswarm-card-selected.png?alt=media&amp;token=b75559b1-2200-489e-bf3e-e8bb91559bef" alt="Selected card, filled blue" data-size="original"></td><td><strong>Selected</strong></td><td>Blue fill: the selected drone.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FcA37PG9BsfbgQIsYQDqQ%2Fswarm-card-tracking.png?alt=media&amp;token=471561a7-2fad-4e1e-868f-1fbe2cf5b5e5" alt="Card with green corner brackets" data-size="original"></td><td><strong>Tracking</strong></td><td>Green corner brackets: the drone's camera is tracking a target. <strong>Strike All</strong> is enabled while any drone tracks.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FmYHbUana4quOmFy8waog%2Fswarm-card-caution.png?alt=media&amp;token=a444f730-1bc6-4cda-97a3-40a53e16ff8c" alt="Card with an orange border" data-size="original"></td><td><strong>Health caution</strong></td><td>Orange border: the drone reports a health caution.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FAUyB0XbaRc6p8tW5sW6s%2Fswarm-card-critical.png?alt=media&amp;token=8cc117fc-f9f6-43e8-9fa5-74013024d8d0" alt="Card with a red border" data-size="original"></td><td><strong>Health critical</strong></td><td>Red border: the drone reports a critical health problem.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FollsppmapS933zQymJoY%2Fswarm-card-battery-low.png?alt=media&amp;token=f4c3129a-ca8a-4945-9bac-34268d43304a" alt="Card with one amber battery cell" data-size="original"></td><td><strong>Battery low</strong></td><td>Amber cells: the battery is low.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FrikO9KqhKRrV7SA3urwk%2Fswarm-card-battery-critical.png?alt=media&amp;token=32dfe88b-97a0-45a6-87a7-229ef2d90c5a" alt="Card with one red battery cell" data-size="original"></td><td><strong>Battery critical</strong></td><td>Red cells: the battery is critical.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fk4NoZn95KaI0u8IMrKtP%2Fswarm-card-link-lost.png?alt=media&amp;token=e9f7623b-9c2e-4444-b29d-213e19eb273b" alt="Card with diagonal stripes" data-size="original"></td><td><strong>Link lost</strong></td><td>Diagonal stripes: AMC has lost the link to the drone.</td></tr><tr><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FGqcI2UKsnUYZaK0NE2fg%2Fswarm-card-struck.png?alt=media&amp;token=65ad9bfc-4e42-437e-b606-f4e0feb1ef07" alt="Card with a dashed outline and a slash" data-size="original"></td><td><strong>Struck</strong></td><td>Dashed outline with a slash: the drone has carried out its strike. Its card can no longer be selected.</td></tr></tbody></table>

### The swarm leader

One drone leads the swarm: the armed drone with the lowest system ID, or, while none is armed, the connected drone with the lowest system ID. The leader changes on its own, for example when it disarms or drops out.

* The leader is not marked in AMC. The formation icons show the leader's position in orange.
* The swarm's position and altitude are those of the leader. Goto, POI and Group move the swarm around the leader.
* AMC must be connected to the leader drone. Without that connection, the swarm flight tools, **Land** and **Hold** are disabled, and takeoff is blocked.
* A command you are setting up is cancelled if the leader changes before you confirm it.

## Swarm controls

<table><thead><tr><th width="130">Control</th><th width="150">Button</th><th>Shown</th><th>Description</th></tr></thead><tbody><tr><td><strong>Takeoff</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2F47b1ClqE2L6LYUQA0Gwh%2Fstep0.png?alt=media&amp;token=422c8964-9e3c-498a-b09b-1a99fe76b649" alt="Takeoff button" data-size="original"></td><td>While any drone is disarmed</td><td>Takes off all drones. See <a href="#taking-off">Taking off</a>.</td></tr><tr><td><strong>Land</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2F5xvoeKBrLC51ZPn7EaU7%2Fstep1.png?alt=media&amp;token=24713b68-1503-485b-b24c-0f22cd14f388" alt="Land button" data-size="original"></td><td>While any drone is flying</td><td>All drones land where they are. Hold to confirm.</td></tr><tr><td><strong>Hold</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FVKobBzKbCgzSG17w9C7b%2Fswarm-hold.png?alt=media&amp;token=4f2da170-4c16-4cf5-8ab0-17c326d02f75" alt="Hold button" data-size="original"></td><td>While any drone is armed</td><td>All drones stop where they are. Also stops a takeoff or landing in progress. Hold to confirm.</td></tr><tr><td><strong>Goto</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FGpYu1SICYwxZK4hQKbOJ%2Fstep3.png?alt=media&amp;token=951e73a3-cc85-4755-8c23-7d71604a125e" alt="Goto button" data-size="original"></td><td>While any drone is flying, with the map as main view</td><td>Tap the map: the leader flies there and the others follow in formation. The altitude slider on the right sets the height. See <a href="#moving-the-swarm">Moving the swarm</a>.</td></tr><tr><td><strong>POI</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2F2cAfXGvdQ7iC6cG9kQGs%2Fstep4.png?alt=media&amp;token=e18f1a48-677b-4328-a969-2716a80d68bf" alt="POI button" data-size="original"></td><td>While any drone is flying, with the map as main view</td><td>Tap the map, or enter a <strong>Heading</strong>: the swarm stops and turns to face that point.</td></tr><tr><td><strong>Group</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2F0coyxHlwIZz823ugwPAu%2Fswarm-group.png?alt=media&amp;token=73ccc768-9a53-41a9-8a13-24623f570a17" alt="Group button" data-size="original"></td><td>While any drone is flying</td><td>The leader holds and the other drones form up around it. Hold to confirm.</td></tr><tr><td><strong>Rally Point</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fq8VAzCsNE13Xep9jgcy6%2Fstep6.png?alt=media&amp;token=d19efb32-7ece-4c49-bd41-80b231cec6aa" alt="Rally Point button" data-size="original"></td><td>With the map as main view, on the ground or in flight</td><td>Sets the point the drones return to. Required before takeoff. See <a href="#setting-the-rally-point">Setting the rally point</a>.</td></tr><tr><td><strong>Formation</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fv4IWms1rjJ57jHDySi5a%2Fstep7.png?alt=media&amp;token=57c06e94-4fbc-43c1-aeb0-d91bfcf11e25" alt="Formation button" data-size="original"></td><td>While any drone is flying</td><td>Opens a panel to choose <strong>Radial</strong>, <strong>Linear</strong>, <strong>Trail</strong> or <strong>GPS Denied</strong>. See <a href="#changing-the-formation">Changing the formation</a>.</td></tr><tr><td><strong>Strike All</strong></td><td><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FFTZdsPy7sMHRcCwKOjRP%2Fswarm-strike-all.png?alt=media&amp;token=e7e3aac5-c05d-4650-8346-2f91d60daa41" alt="Strike All button" data-size="original"></td><td>While any drone is flying. Enabled only while a drone of the swarm is tracking a target</td><td>Every drone tracking a target strikes it. See <a href="#strike-all">Strike All</a>.</td></tr></tbody></table>

## Using swarming

### Setting the rally point

Every drone needs a rally point before the swarm can take off. Without one, a return-to-launch or failsafe would land all drones at their home position, on top of each other.

1. Open the swarm flight tools and select **Rally Point**.
2. Tap the map where the swarm should gather. A marker labelled **Rally** appears. Drag it to adjust.
3. Hold to confirm.

Each drone gets its own slot in a circle around the point, so they do not land on top of each other. The drone with the lowest system ID takes the centre. A new rally point replaces the previous one, and does not change what the drones are currently doing.

### Taking off

1. Select **Takeoff** in the left tool strip.
2. Set the altitude with the slider. Every drone climbs the same height above its own takeoff point, measured from the leader's position.
3. Set the **Takeoff Interval**: the delay between one drone lifting off and the next, from 0 to 15 seconds (default 2 s). Use **0 s** to take off all drones at the same time. The interval is shown only when the swarm has more than one drone, and resets when AMC restarts.
4. Hold to confirm.

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fk1pS41SU2Jq7KA9Mi58P%2Fswarm-takeoff-interval.png?alt=media&amp;token=57ad3cab-dd9d-4ea7-af35-55f9478f760f" alt="Takeoff Interval card set to 2 s" width="168"><figcaption><p>The Takeoff Interval card</p></figcaption></figure>

The **Takeoff** button stays disabled until all of the following are true:

* The swarm engine address is valid, and the engine is reachable.
* The engine lists at least one drone, and no takeoff or landing is in progress.
* Every drone the engine lists is connected to AMC, has been heard by the engine in the last few seconds, and has a rally point.
* AMC knows the swarm's position.
* At least one drone of the swarm is not yet armed.

{% hint style="info" %}
AMC does not show which condition blocks the takeoff. If **Takeoff** is disabled, check the list above.
{% endhint %}

### Moving the swarm

* **Goto:** select **Goto** and tap the map. The leader flies there and the other drones follow in formation. Drag the target to change it, then select **Done**. Goto needs no confirmation.
  * **Altitude:** the altitude slider on the right sets the height of the Goto. Adjusting it during a Goto moves the drones up or down: they fly to the Goto point at the new height.
* **POI:** select **POI** and tap the map, or enter a **Heading**. The swarm stops where it is and turns to face the point, keeping its altitude. Select **Done** when finished.

Goto and POI close on their own when no drone is flying any more.

### Changing the formation

1. Select **Formation**.
2. Select **Radial**, **Linear**, **Trail** or **GPS Denied**. The orange part of each icon shows where the leader flies.

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2F7QZR6iDtKg7RBg6LLtJF%2Fswarm-formation-panel-gps-denied.png?alt=media&amp;token=8c4b6ff1-4232-4d44-a79e-6574add00cf6" alt="Formation panel with Radial, Linear, Trail and GPS Denied" width="285"><figcaption><p>The formation panel. Orange marks the leader.</p></figcaption></figure>

**Radial**, **Linear** and **Trail** are sent immediately, with no confirmation. The followers position themselves around the leader.

**GPS Denied** prepares the swarm to fly without GPS. Hold to confirm: the swarm switches to its GPS-denied formation and the leader switches to Altitude mode. The button stays disabled until the switch has finished. If it does not finish within 15 seconds, AMC shows *Swarm GPS Denied failed* with the reason.

{% hint style="warning" %}
AMC does not know which formation the swarm is flying, so no formation is shown as selected. If the drones cannot fly the formation, AMC does not report it.
{% endhint %}

### Grouping the swarm

Select **Group** and hold to confirm. The leader holds its position and the other drones form up around it, for example after the swarm has spread out.

### Strike All

**Strike All** is enabled only while at least one drone of the swarm is tracking a target. See [Strike UI](https://docs.auterion.com/vehicle-operation/auterion-mission-control/fly/strike-ui.md) for how to track a target.

1. Select **Strike All**. The confirmation panel lists the drones that are tracking a target.
2. Select and hold **Hold to Strike All**.

Every drone tracking a target strikes it. The other drones leave their task, and regroup if the leader is among the striking drones.

### Holding and landing

* **Hold:** all drones stop where they are. Hold also stops a takeoff or landing that is in progress.
* **Land:** all drones land where they are.

## GPS navigation mode for the swarm

When the drones support GNSS-denied navigation and the GNSS-denied features are enabled (see [GPS Denied Workflow](https://docs.auterion.com/vehicle-operation/auterion-mission-control/fly/gps-denied-workflow.md)), the GPS indicator in the top bar and the GPS menu of the vehicle menu apply to the whole swarm once at least two drones of the same swarm are present:

* The section is titled **Swarm Navigation Mode**.
* The switch **Fuse GPS on all drones** turns GPS fusion on or off on every drone that AMC is connected to.

After you change the switch, it waits in the middle until the drones report the new state, and returns to the reported state after a few seconds if they do not. Drones that do not support GNSS-denied navigation are skipped. **VisNav**, **Beacons** and **LEO Satellite** still apply only to the selected vehicle.

{% hint style="info" %}
The navigation mode resets to its default when a drone reboots.
{% endhint %}

## Messages

| Message                                                      | Meaning                                                                                                                                                |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| *Swarm rally point not set: no answer from the swarm engine* | The engine did not answer the rally point request. Check the engine connection and set the rally point again.                                          |
| *Swarm rally point not set: the swarm engine refused it*     | The engine rejected the rally point.                                                                                                                   |
| *Swarm drone N: takeoff refused* / *takeoff failed*          | Drone N did not accept the takeoff, or accepted it and then failed.                                                                                    |
| *Swarm drone N: landing refused* / *landing failed*          | Drone N did not accept the landing, or accepted it and then failed.                                                                                    |
| *Swarm GPS Denied failed: …*                                 | The switch to GPS Denied did not finish: no answer from the engine, formation refused, the leader was lost, or the leader did not reach Altitude mode. |
| *Command timed out: …*                                       | No result for the command within 30 seconds.                                                                                                           |
| *Action not allowed: User is not pilot*                      | This AMC is not the pilot of the vehicles.                                                                                                             |

## Known limitations

* Commands always go to every drone the engine lists. Individual drones of the swarm cannot be commanded with the swarm controls.
* Only takeoff and landing report failures per drone. AMC only learns whether the engine accepted **Formation**, **Group** and **Strike All**, not whether the drones carried them out.
* AMC does not show the current formation or which drone is the leader.
* A missing rally point on a drone only becomes visible at the next return-to-launch. AMC checks the rally points before takeoff.
