Skip to main content
SITL (software in the loop) runs the real ArduPilot autopilot on your computer with simulated physics. The SITL tool in the Mission Control repo launches ArduPilot SITL and bridges its TCP MAVLink stream to a WebSocket the browser can open. Unlike demo mode, which uses mock telemetry, SITL runs actual autopilot code: missions, parameters, modes, failsafes and calibrations behave as they do on hardware.
SITL is the place to rehearse arming, takeoff and missions, but behaviour on a real aircraft can differ. Read Safety before flying hardware.

Set up

The tool lives at tools/sitl/ in the Mission Control repository.
1

Build ArduPilot SITL

The setup script clones ArduPilot to ~/.ardupilot (or $ARDUPILOT_HOME) and builds ArduCopter for the SITL board:
To build by hand, follow the ArduPilot build instructions, then run ./waf configure --board sitl and ./waf copter (or plane, rover) in the ArduPilot tree.
2

Install the tool

Connect Mission Control

1

Start the tool

It launches ArduCopter SITL and prints a URL such as ws://[::1]:5760/?token=<token>. The token is random and changes on every run.
2

Open the Connect dialog

Run Mission Control on the same machine (http://localhost:4000). Click + at the top of the Fleet sidebar.
3

Paste the URL

Choose the WebSocket method and paste the full URL, ?token= included. The SITL #1 to SITL #5 chips fill in the port for each drone; you still paste the token. Click Connect. The simulated copter appears with live telemetry.
Connect to Drone dialog with WebSocket selected, a ws://[::1]:5760/?token= URL pasted and the SITL port chips

Connect to Drone with the WebSocket method and a pasted SITL URL (placeholder token).

The bridge refuses any connection without the token. It accepts browser pages served from localhost, 127.0.0.1 or [::1]; add another exact origin with --allow-origin. It binds the IPv6 loopback ::1 because each drone’s WebSocket shares its SITL TCP port number and SITL listens on IPv4.

Options

Multiple drones

--drones N starts N instances, each with its own system ID and its own port: 5760 for the first drone, then 5770, 5780 and so on (10 apart). The bridge runs one WebSocket per drone on that drone’s port and prints one URL per drone; all share the run’s token.
Connect Mission Control once per printed URL. Each drone appears in the Fleet sidebar.

How the bridge works

The bridge relays binary MAVLink frames in both directions without parsing or changing them.

Test a mission

  1. Plan a mission in the Plan tab and upload it to the SITL drone.
  2. Arm, take off and switch to AUTO.
  3. Watch it fly on the node’s Flight tab. Afterwards, review it in Flight logs.

Troubleshooting

The tool looks for ArduPilot in ~/.ardupilot. Point it elsewhere with --ardupilot, and make sure you built the vehicle you asked for (./waf copter, ./waf plane).
Paste the whole printed URL, including ?token=. The token changes every run, so copy it again after a restart. Use ws://[::1]:..., not ws://localhost:..., and open Mission Control from localhost or add its origin with --allow-origin.
SITL takes a few seconds to start. Wait until the tool reports that ArduPilot is ready, then reconnect.
Wait for the simulated GPS fix, then arm in a manual mode first and switch to Loiter or AUTO after takeoff.

Next steps

3D mission preview

Preview a plan in 3D before flying it in SITL.

Connect a drone

Every connection method.
Last modified on October 11, 2026