Setting up SITL on Windows

This article shows how to build and run SITL natively on Windows. The specific commands were tested on Windows 8.1 using Cygwin 2.0.0, MAVProxy 1.4.19, Mission Planner 1.3.25, and AC3.3 (Copter).


The SITL (Software In The Loop) simulator is a build of the ArduPilot code which allows you to run Plane, Copter or Rover without any hardware.

SITL was originally developed on Linux, and but can now be built and run natively on both Linux or Windows. It can also be run on a virtual machine (Linux) hosted on Windows, Mac OSX, or Linux.

These instructions explain how to build SITL natively on Windows, and how to interact with the simulator using MAVProxy and/or Mission Planner.


MAVProxy Map: Guiding a SimulatedCopter

Installation steps


An automatic download and installation script for MAVProxy, Cygwin, JSBSim and ArduPilot can be found here. After downloading the file, right click -> Run in Powershell.

Install MAVProxy

MAVProxy is a fully-functioning but minimalist console-based GCS that is commonly used for testing and developing ArduPilot:

Older builds can be obtained from

Install Cygwin

Cygwin provides the tools and libraries that allow us to rebuild ArduPilot on Windows.

  1. Download and run the Cygwin 32-bit installer or the `Cygwin 64-bit installer <`__.

  2. Accept the all the prompts (including default file locations) until you reach the Select Packages dialog.There are thousands of packages. The easiest way to find the packages is to search on the name. When you’ve found a needed package click on the Skip button to select it for download:


    Cygwin Installer: Select Package Dialog

  3. Select the packages listed below (search using the text in the “Name” field):

    Name Category / Name / Description
    autoconf Devel | autoconf: Wrapper scripts for autoconf commands
    automake Devel | automake: Wrapper scripts for automake and aclocal
    ccache Devel | ccache: A C compiler cache for improving recompilation
    g++ Devel | gcc-g++ GNU Compiler Collection (C++)
    git Devel | git: Distributed version control system
    libtool Devel | libtool: Generic library support script
    make Devel | make: The GNU version of the ‘make’ utility
    gawk Interpreters | gawk: GNU awk, a pattern scanning and processing language
    libexpat Libs | libexpat-devel: Expat XML parser library (development files)
    libxml2-devel Libs | libxml2-devel: Gnome XML library (development)
    libxslt-devel Libs | libxslt-devel: XML template library (development files)
    python-devel Python | python-devel: Python2 language interpreter (python3 does not work yet)
    procps System | procps-ng: System and process monitoring utilities (required for pkill)
  4. When all the packages are selected, click through the rest of the prompts and accept all other default options (including the additional dependencies).

  5. Select Finish to start downloading the files.

Set up directories/paths in Cygwin

To save having to set up paths every time you start SITL, it can be helpful to set up the path to the Tools/autotest directory.

  1. Open and then close the Cygwin Terminal from the desktop or start menu icon.


    This will create initialisation files for the user in the Cygwin home directory (and display their locations). For example, a user’s home directory might be located at C:\cygwin\home\user_name\.

  2. Navigate the file system to the home directory and open the .bashrc files (e.g. C:\cygwin\home\user_name\.bashrc.

  3. Add the following line to the end of .bashrc

    export PATH=$PATH:$HOME/ardupilot/Tools/autotest

The file will be loaded next time you open the Cygwin terminal.


Cygwin will not be able to find if you omit this step. This will be reported as a “command not found” error when you try and build: -j4 --map

Install required Python packages

python -m ensurepip --user
python -m pip install --user future
python -m pip install --user lxml
python -m pip install --user uavcan

Download and make ArduPilot

Open (reopen) Cygwin Terminal and clone the Github ArduPilot repository:

git clone git://
cd ardupilot
git submodule update --init --recursive
If you have an existing clone of the ArduPilot repository, navigate to it in the terminal using “cd /cygdrive/drive/path”
ie “cd /cygdrive/c/Users/James/Documents/GitHub/ardupilot” (substitute your own path).

In the terminal navigate to the ArduCopter directory and run make as shown:

cd ~/ardupilot/ArduCopter
make sitl -j4

The platform that is built depends on the directory where you run make (so this this will build Copter).


An additional component is required before you can build Plane - see next step!

JSBSim (Plane only)

If you want to fly the fixed wing (Plane) simulator then you will need to use the JSBSim flight simulator. JSBSim is a sophisticated flight simulator that is used as the core flight dynamics system for several well known flight simulation systems. The reason we use JSBSim is that it provides a way to get extremely high frame rate simulation, which is essential for the register level sensor emulation that we use in the SITL build.

Open the Cygwin Terminal, navigate to your home directory, and enter:

git clone git://
cd jsbsim
cp src/JSBSim.exe /usr/local/bin

Now you can navigate to the ArduPlane directory and build Plane in the same way as described for Copter in the next section (Running SITL and MAVProxy):

cd ~/ardupilot/ArduPlane -j4 --map

FlightGear 3D View (Optional)

Developers can optionally install the FlightGear Flight Simulator and use it (in view-only mode) to display a 3D simulation of the vehicle and its surroundings. This provides a much better visualization than the 2D maps and HUD flight displays provided by MAVProxy and Mission Planner.


FlightGear support is currently only in master (January 2016). It should appear in the next versions of the vehicle codelines (not present on current versions: Copter 3.3, Plane 3.4, Rover 2.5).


FlightGear:Simulated Copter at KSFO (click for larger view).

SITL outputs FlightGear compatible state information on UDP port 5503. We highly recommend you start FlightGear before starting SITL (although this is not a requirement, it has been found to improve stability in some systems).

The main steps are:

  1. Download FlightGear 3.4.0


    At time

    of writing version 3.4.0 is required on Windows.

  2. Open a new command prompt and run the appropriate batch file for your vehicle in /ardupilot/Tools/autotest/: fg_plane_view.bat (Plane) and fg_quad_view.bat (Copter).

    This will start FlightGear.

  3. Start SITL in Cygwin in the normal way. In this case we’re specifying the start location as San Francisco airport (KSFO) as this is an interesting airport with lots to see: -j4 -L KSFO


    FlightGear will always initially start by loading scenery at

    KSFO (this is hard-coded into the batch file) but will switch to the scenery for the simulated location once SITL is started.


If the vehicle appear to be hovering in space (no
scenery) then FlightGear does not have any scenery files for the selected location. Choose a new location!

You can now takeoff and fly the vehicle as normal for Copter or Plane, observing the vehicle movement including pitch, yaw and roll.


A very small number of users have reported build errors related to Windows not setting paths correctly. For more information see this issue.

Running SITL and MAVProxy


Use batch files to simplify the running of SITL down to a single double-click. See here for some examples.

MAVProxy is commonly used by developers to communicate with SITL. To build and start SITL for a 4-core CPU and then launch a MAVProxy map:

  1. Navigate to the target vehicle directory (in this case Copter) in the Cygwin Terminal and call to start SITL:

    cd ~/ardupilot/ArduCopter -j4 --map --console

    If you get a windows security alert for the the firewall, allow the connection.

    Tip has many useful build options, ranging from setting the simulation speed through to choosing the initial vehicle location. These can be listed by calling it with the -h flag (and some are demonstrated in Using SITL for ArduPilot Testing).

  2. SITL and MAVProxy will start. MAVProxy displays three windows:

    • A command prompt in which you enter commands to SITL
    • A Console which displays current status and messages
    • A map that shows the current position of the vehicle and can be used (via right-click) to control vehicle movement and missions.


    It is useful to arrange the windows as shown above, so you can observe the status and send commands at the same time.

  3. Configure the vehicle by loading some standard/test parameters into the MAVProxy command prompt:

    param load ..\Tools\autotest\default_params\copter.parm
  4. You can send commands to SITL from the command prompt and observe the results on the map.

    • Change to GUIDED mode, arm the throttle, and then takeoff:

      mode guided
      arm throttle
      takeoff 40

      Watch the altitude increase on the console.


      Takeoff must start within 15 seconds of arming, or the motors will disarm.

    • Change to CIRCLE mode and set the radius to 2000cm

      mode circle
      param set circle_radius 2000

      Watch the copter circle on the map.

    • When you’re ready to land you can set the mode to RTL (or LAND):

      mode rtl

This is a very basic example. For links to more information on what you can do with SITL and MAVProxy see the section: Next Steps.

Adding additional GCS with MAVProxy

You can attach multiple additional ground control stations to SITL from MAVProxy. The simulated vehicle can then be controlled and viewed through any attached GCS.

First use the output command on the MAVProxy command prompt to determine where MAVProxy is sending packets:

GUIDED> output
GUIDED> 2 outputs

This tells us that we can connect Mission Planner to either UDP port 14550 or 14551, as shown on the dialog below.


Mission Planner: Connecting to a UDPPort


We could connect APM Planner 2 to the remaining port. If we needed a third port, we could add it as shown:

GUIDED> output add 1:

Mission Planner can then be used to control the simulated vehicle in exactly the same way as though it were a real vehicle. We can reproduce the previous “takeoff-circle-land” example as shown below:

  1. Change to GUIDED mode, arm the throttle, and then takeoff

    • Open the FLIGHT DATA screen and select the Actions tab on the bottom left. This is where we can change the mode and set commands.


      Mission Planner: Actions Tab (Set Mode, Arm/Disarm)

    • Select Guided in the Mode selection list and then press the Set Mode button.

    • Select the Arm/Disarm button

    • Right-click on the map and select Takeoff. Then enter the desired takeoff altitude


      Mission Planner Map: Takeoff Command


    Takeoff must start within 15 seconds of arming, or the motors will disarm.

  2. Change to CIRCLE mode on the Action tab and watch the copter circle on the map.

  3. You can change the circle radius in the CONFIG/TUNING screen. Select Full Parameters List, then the Find button and search for CIRCLE_MODE. When you’ve changed the value press the Write Params button to save them to the vehicle.

  4. When you’re ready to land you can set the mode to RTL.

Running SITL with a GCS without MAVProxy

It is also possible to interact with SITL without using MAVProxy at all using ArduCopter.elf (in the ArduCopter directory).

Run the file in the Cygwin Terminal, specifying a home position and vehicle model as shown below:

hamis_000@XPS12ultra ~/ardupilot/ArduCopter
$ ./ArduCopter.elf --home -35,149,584,270 --model quad
Started model quad at -35,149,584,270 at speed 1.0
Starting sketch 'ArduCopter'
Starting SITL input
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection ....

The command output shows that you can connect to SITL using TCP/IP at port 5760.

In Mission Planner we first change the link type to TCP and then press the Connect button. Click through the remote host and remote Port prompts as these default to the correct values.


Mission Planner: Connecting toSITL using TCP

Mission Planner will then connect and can be used just as before.


ArduCopter.elf has other startup options, which you can use using the -h command line parameter:

./ArduCopter.elf -h

Updating ArduPilot

The ArduPilot source is cloned to the Windows Cygwin home directory (e.g. C:\cygwin\home\user_name\ardupilot). Developers can edit the source in ardupilot/, or update it using git pull.

Similarly, the JSBSim source can be updated by calling git pull in the jsbsim/ directory.

Updating MAVProxy


The MAVProxy 1.4.19 *installer does not properly remove all parts of preceding installations. Before installing a new version you must first delete the old directory: C*:\Program Files (x86)\MAVProxy\**.

Simply Download and Install MAVProxy for Windows (this link always points to the latest version!)

Next steps

SITL and MAVProxy can do a whole lot more than shown here, including manually guiding the vehicle, and creating and running missions. To find out more: