Skip to main content
SITL (Software In The Loop) lets you test Mission Control against a full ArduPilot autopilot running on your computer. No drone hardware needed. The bundled SITL tool launches ArduPilot SITL and bridges its TCP output to a WebSocket that the browser can connect to.
Terminal showing SITL launcher with ArduPilot running

What SITL Provides

  • Real ArduPilot code. Not a mock or simulation. The same firmware that runs on flight controllers runs on your machine with physics simulation.
  • Full MAVLink. Every MAVLink message, parameter, and command works exactly as it would on real hardware.
  • Physics engine. Simulated flight dynamics for copter, plane, rover, and sub vehicles.
  • No fake data. Unlike demo mode (which uses mock telemetry), SITL runs the actual autopilot.

Prerequisites

SITL requires ArduPilot built from source on your machine.
1

Clone ArduPilot

2

Install build dependencies

Follow the ArduPilot build instructions for your OS. On macOS:
On Ubuntu/Debian:
3

Build SITL

This builds ArduCopter for the SITL target. You can also build plane, rover, or sub.

Using the SITL Tool

The SITL tool lives at tools/sitl/ inside the Mission Control repo.
1

Start the SITL tool

By default, this launches ArduCopter SITL and starts a WebSocket bridge on port 5760.
2

Connect from Mission Control

Open Mission Control in your browser. Click Connect, select the WebSocket tab, and enter:
Click Connect. You should see a simulated copter appear with full telemetry.
3

Interact with the simulated drone

The SITL drone behaves like a real ArduPilot vehicle:
  • Arm and takeoff
  • Change flight modes
  • Upload and execute missions
  • Configure parameters
  • Run calibrations

Configuration Options

The SITL tool accepts command-line flags: Examples:

How the Bridge Works

ArduPilot SITL speaks MAVLink over TCP (default port 5760). Browsers cannot connect to raw TCP sockets. The SITL tool bridges this gap:
The bridge is a thin relay. It connects to SITL’s TCP port, opens a WebSocket server, and forwards binary MAVLink frames in both directions. No parsing, no modification. What goes in comes out.

Multi-Drone SITL

For multi-drone testing, pass --drones N. The tool launches multiple SITL instances, each with a unique system ID, and the bridge multiplexes all of them onto a single WebSocket port:
In Mission Control, connect once to ws://localhost:5760. The GCS demultiplexes by system ID from the HEARTBEAT messages, and all three drones appear in the fleet sidebar.

Testing Missions

SITL is ideal for testing missions before flying:
  1. Plan a mission in the Plan tab.
  2. Upload it to the SITL drone.
  3. Switch to Auto mode.
  4. Watch the simulated drone fly the mission.
  5. Check the 3D simulation view for the flight path.
The physics engine simulates wind, battery discharge, and sensor noise, giving you a realistic preview of how the mission will execute.

Testing Configuration

All configuration panels work with SITL:
  • Read and write parameters
  • Calibrate sensors (simulated sensor data)
  • Configure failsafes and test triggers
  • Set up geofences and test breach behavior
  • Configure flight modes and switch between them

Automated Testing

The SITL tool also serves as a backend for browser automation. A Playwright test can start a SITL instance, point the browser at the bridge, and exercise the full GCS workflow end to end: connect, read parameters, upload a mission, arm, take off, fly, and land. Because SITL runs the real autopilot, these runs catch protocol and timing issues that mock telemetry would hide.

Troubleshooting

The tool looks for ArduPilot at ~/.ardupilot by default. If you installed it elsewhere, point at it with the --ardupilot flag. Make sure you have built the correct vehicle type (./waf copter, ./waf plane, etc.).
Check that the SITL tool is running and the port is not in use by another process. Run lsof -i :5760 to check.
SITL may take a few seconds to initialize. Wait for the “APM: Ready to fly” message in the SITL output. If telemetry still does not appear, check that the TCP bridge connected successfully (look for “Connected to SITL” in the tool output).
The default SITL configuration may have conservative parameters. Make sure GPS is locked (SITL simulates GPS fix after a few seconds). Try arming in Stabilize mode first, then switching to Loiter or Auto after takeoff.