Using SITL with RealFlight

RealFlight is a commercial flight simulator with a 3D view, and the ability to design and test custom vehicles.

This simulator only runs on Windows and requires RealFlight version 8 or version 9. Note that RealFlight-X does not work with ArduPilot. If you are installing for the first time then RealFlight version 9 is recommended.

The quickest way to get started it to buy RealFlight 9 in Steam.

Configure RealFlight

  • Start RealFlight (it should look exactly like regular RealFlight, there is no way to visually determine the difference)
  • Download the QuadcopterX from ArduPilot/SITL_Models/RealFlight/Tridge/MultiRotors/QuadCopterX/Quadcopter X - direct throttles_AV.RFX
  • Select Simulation, Import, RealFlight Archive (RFX, G3X) and select the file QuadcopterX downloaded above. A message, “..was successfully imported” should be displayed
  • Select Aircraft, Select Aircraft, open “Custom Aircraft” section and select “Quadcopter X - direct throttle”. In the current state, the RC inputs come straight from the stick so it is not flyable.

From within RealFlight, Reduce graphics options to improve performance:

  • Simulation, Settings, Graphics
  • Under “Quality” set all values to “No” or “Low” (i.e. set “Clouds” to “No”, “Water Quality” to “Low”, etc)
  • Under “Hardware” set “Resolution” to “800 x 600 Medium(16 bit) and select “Full Screen” mode
  • Under physics settings, change the option for “pause simulator when in background” to No

Connecting to Mission Planner’s SITL

  • On Config/Tuning, Planner set the Layout drop-down to “Advanced”
  • On the top menu bar, select Simulation
  • From the “Model” drop-down, select “flightaxis” and push the Multirotor icon
  • on the Full Parameter List or Tree screens, on the right-side select realflight-quad and press load parameters

On the real-flight controller press the red “reset” button to reset the vehicle’s attitude and position and initialise the connection with SITL. - the message “FlightAxis Controller Device has been activated.” should appear and the motors should become quieter

If the vehicle’s position is not reset, from within RealFlight:

  • Aircraft, Select Aircraft
  • Custom Aircraft, QuadcopterX - direct throttles
  • press OK
  • after the vehicles position is reset, press the transmitter’s “Reset” button again

Connecting to SITL running on a separate (or Virtual) machine:

  • determine the IP address of the Windows machine running RealFlight by opening a console and entering “ipconfig”. The result will likely be something like 192.168.x.x OR if running sitl on a Windows machine using cygwin or WSL

  • on the separate machine where SITL will run, start SITL with “-f flightaxis:192.168.x.x” or if using a tradition helicopter, “-f heli-dual –model flightaxis:192.168.x.x”.

    • cd ArduCopter
    • ../Tools/autotest/sim_vehicle -f flightaxis:192.168.x.x –map –console
  • back on RealFlight push the red “RESET” button on the transmitter

  • after about a minute, the vehicle should be visible on the SITL map

  • the performance of the connection can be checked by opening the “ArduCopter” window (on the machine running SITL), the “FPS” (Frames Per Second) count needs to be over 150 for the vehicle to fly well

Using ready-made models

As mentioned above, RealFlight allows designing your own custom vehicles including choosing the size, weight, appearance, and motor and control surface placement.

A number of custom models have been created by ArduPilot developers and stored in the ArduPilot/SITL_Models repository. You should be able to clone this repo using git clone and then load the models into RealFlight. In the directory for each model there is a .parm file that can be loaded into SITL so that appropriate tunings parameters are set.

To import one of these models:

  • on RealFlight select Simulation >> Import >> RealFlight Archive (RX, G3X) and select the model you’re interested in
  • select Aircraft >> Select Aircraft and select the model imported from the above step
  • from within SITL type param load <filename> to load the parameter found in the same directory as the model, i.e. param load ../../SITL_Models/RealFlight/Tridge/QuadPlane/BigStickQuadPlane.parm to load the quadplane parameters. In some cases you may need to restart SITL in order for some parameters to take effect.