SITL (Software-In-The-Loop) runs the real autopilot firmware against a simulated physics engine. The MAVLink endpoints are the same as hardware — only the transport differs.
text
Common SITL connection strings ──────────────────────────────────────────────────────────── Autopilot Transport Connection string Notes ────────── ────────── ──────────────────────── ────────────── PX4 SITL UDP udpin:0.0.0.0:14550 Default GCS port PX4 SITL UDP udp:127.0.0.1:14540 API port (MAVSDK) ArduPilot TCP tcp:127.0.0.1:5760 Default SITL TCP ArduPilot UDP udpin:0.0.0.0:14550 After mavproxy Any Serial /dev/ttyUSB0,57600 USB telemetry radio
bash
# PX4 SITL with Gazebo (launches MAVLink on :14550 and :14540) cd PX4-Autopilot make px4_sitl gz_x500 # ArduPilot SITL cd ardupilot sim_vehicle.py -v ArduCopter --map --console
Multiple connections
PX4 SITL exposes port 14550 for GCS and 14540 for offboard APIs. If you need a second connection (e.g. GCS + your app), use mavproxy to multiplex: `mavproxy.py --master=udp:127.0.0.1:14550 --out=udp:127.0.0.1:14551`.