# Record a drone flight

# Record a drone flight

Record a PX4 or ArduPilot vehicle's telemetry — attitude, battery, position,
armed state, its messages and every parameter — and watch it live.

## Before you start

- How the vehicle reaches this computer: a USB cable, a telemetry radio's
  ground module, or the network (a simulator, a companion computer, or a
  ground station forwarding MAVLink).
- For a radio, its speed — `57600` unless you changed it.
- For the network, the port the vehicle sends to (usually `14550`), or its
  address if you connect to it.

## Steps

1. Open **Connectors**, search for `mavlink`, and press **Install**.
2. Plugged a flight controller in over USB? It appears under **Detected** on
   **Inputs** — press **Set up**, then **Start**, and skip to *Check it
   worked*. Otherwise open **Inputs**, press **Add input**, and choose
   **MAVLink**.
3. Choose the **Connection**:

   | Connection | When | Then fill |
   |---|---|---|
   | **USB cable** | the flight controller is plugged into this computer | **Port** |
   | **Telemetry radio** | a radio's ground module is plugged in | **Port** and **Speed** |
   | **Listen on the network** | the vehicle or a ground station sends to this computer | **Port** |
   | **Connect to an address** | you reach the vehicle at a fixed address | **Address** (`host:port`) and **Protocol** |

4. Flying PX4 over USB or Ethernet? Turn on **Stream the full log (PX4)** to
   record every topic the autopilot logs, not only its telemetry.
5. Press **Test connection**. It names the flight controller that answered
   and its autopilot.
6. If it shows **Same channels as** another input, this vehicle has the same
   system id as one you already record. Choose **Own folder** to keep its
   channels under its own name, or **New device ID** to give the vehicle a new
   id — restart the vehicle, then press **Test again**.
7. Press **Add & start**.

## Check it worked

On **Inputs**, the row counts samples. On **Live**, the vehicle's channels
appear under `/mav/1/1/…`:

| Look at | Channel |
|---|---|
| attitude | `attitude/roll`, `attitude/pitch`, `attitude/yaw` |
| battery | `battery_status/voltages[0]` |
| position on the map | `global_position_int/fix`, once GPS has a 3D fix |
| armed or disarmed | `heartbeat/armed`, drawn as a lamp |
| what the autopilot says | `statustext`, as a message log |
| parameters | `param/<NAME>`, one per parameter, updated when one changes |

After the flight, open **Replay** to play it back.

> **Tip:** Already flying with QGroundControl or Mission Planner? Only one
> program can open a USB port. Turn on MAVLink forwarding in your ground station
> and choose **Listen on the network** here.

- [Verify that your data is arriving](https://phloem.ai/docs/guides/verify-data/): Read an input's row when nothing shows
- [Replay a recording](https://phloem.ai/docs/guides/replay-a-recording/): Play back what was recorded
- [Name channels and units](https://phloem.ai/docs/inputs/channels/): Name a signal, set its unit
