2.3 Frequently Asked Questions
2.3.1 When simulating with SIL or HIL, RflySim3D shows: Fatal error: [file: DJV]
The specific error interface is as follows:

Answer: This RflySim3D error may be caused by a graphics driver compatibility issue. It is recommended to update your graphics driver to the latest version. If the issue persists, please contact RflySim Toolchain support.
2.3.2 After refreshing the QGC flight log in Analyze Tools, I cannot find the log for the corresponding HIL session time.
Answer: Open QGC and enter the Vehicle Settings:


Go to the Parameters tab, search for "log", find the SDLOG_MODE parameter, and change it as shown below to log from boot to shutdown. This will ensure all logs are recorded.

2.3.3 What should I do if Ubuntu 18.04 installation fails during RflySim Toolchain installation?
Answer:
First, set the default WSL version to 1 by running wsl --set-default-version 1 in CMD, then open the Ubuntu terminal. The reason is that Windows 11 enables WSL 2 by default, but the kernel may not be updated, causing Ubuntu configuration to fail. Setting WSL 1 as the default resolves this issue.
2.3.4 How can I view UAV flight data (altitude, speed, historical data) during SIL simulation?
Answer:
You can check the flight log online (works for both SIL and HIL). First run the SIL/HIL simulation, then in QGC click the icon in the upper-left corner, then click Analyze Tools.

Then click Log Download, Refresh the log list, select the desired log, and click Download.

Select a download path, which will generate a .ulg format file.

Go to https://logs.px4.io/ and click Choose File to find and upload the .ulg file.

You can then view the flight data as shown below:

2.3.5 Can HIL simulation be performed with APM firmware?
Answer:
The RflySim Toolchain does not currently support APM hardware-in-the-loop simulation. APM HIL simulation requires the FPGA-based simulation platform, which bypasses the flight controller sensors and directly provides hardware-level analog sensor signals. However, this feature has not been officially released yet.
2.3.6 After installing RflySim with MATLAB 2022a, the PX4 PSP toolbox does not appear in the Add-On manager. Is something wrong?
Answer:
Starting from MATLAB 2021, the PX4 PSP module is no longer displayed in the Add-On management module, but this does not affect normal functionality.
2.3.7 How can I add a new FlightGear airport scene to the drone simulation?
Answer:
FlightGear is no longer maintained within the toolchain. You can download the latest version from the FlightGear website and configure the connection yourself.
2.3.8 What language are the .bat files in each example written in?
Problem Description:
A .bat file as shown below:

Answer:
These files are batch scripts of the RflySim Toolchain, designed for quickly launching related software and programs with a single click.
2.3.9 In the toolchain examples, which file handles communication when the start.bat script is executed?
Answer:
The .bat file launches programs and passes parameters to them. To understand how communication is established, first identify which components are communicating with each other, in order to determine the appropriate communication method. The following diagram shows the call relationships between modules:

The platform consists of three core components: RflySim3D, CopterSim, and QGC. RflySim3D handles visualization and model rendering; CopterSim manages vehicle motion by loading the vehicle's control model and binding it with the vehicle model in RflySim3D; QGC is responsible for map display, mission planning, and trajectory planning for vehicles by setting target waypoints.
2.3.10 Can the software use Docker containers to run single UAV simulation? How can Docker be used for large-scale swarm simulation deployment?
Answer:
Docker-based deployment requires the Linux version of RflySim, which is not yet publicly available. For large-scale swarm scenarios, a cloud version (RflySim Cloud) is currently under development. For the current software-in-the-loop version, a single computer is recommended to support no more than 15 vehicles — running more may cause instability.
2.3.11 How does hardware-in-the-loop simulation relate to the firmware on the flight controller?
Answer:
During HIL simulation, you first flash your own or the official firmware to the flight controller. Then, the flight controller receives simulated sensor data from CopterSim, computes control outputs based on that data, and sends the control commands back to CopterSim.
2.3.12 Does the RflySim Toolchain support Linux?
Answer:
A Linux version has been in development and internal testing. It is available as a separate commercial product; please contact the RflySim team for details.
2.3.13 The uORB write module reports an error when added. Is there a default call address? How should this be configured?

Answer:
Reinstall the toolchain with a freshly opened MATLAB/Simulink instance. During installation, select "Yes" for option 5 (reinstall PSP toolbox).
2.3.14 An error occurs when uploading firmware, as shown below:
Problem Description:

Answer:
Open Device Manager and check available COM ports — there may be too many devices connected.
1) Check whether a new COM port appears when the flight controller is connected. If not, there may be a driver issue. Run the file "[Installation Directory]\drivers\driver.msi" to reinstall the driver.
2) If the COM port is displayed but the issue persists, there may be too many USB devices connected. Try disabling unused device ports.
3) If neither method works, you can flash the firmware through QGC instead.
2.3.15 Can RflySim run on domestic platforms (e.g., Kylin OS with Phytium CPU, or UOS with Hygon CPU)? Can it run on Windows 7?
Answer:
These domestic platforms have not been tested. The minimum supported operating system is Windows 10.
2.3.16 How to resolve errors during RflySim Toolchain installation?
Problem Description:

Answer:
The installation package may be corrupted. Please download the installation package again.
2.3.17 How to resolve a blue screen (BSOD) during installation?
Problem Description:

Answer:
This may be caused by insufficient hard disk space. You can change the installation path to a different drive and reinstall.
2.3.18 Is there an example or guide for flashing firmware via QGC?
Answer:
Please refer to the following path: [RflySim Installation Directory]\RflySimAPIs\2.RflySimUsage\1.BasicExps\e10_Firmware_Upload\Readme.pdf

2.3.19 When the computer is not connected to the internet, the map on the QGC interface does not display after installation. How can this be resolved?
Problem Description:

Answer:
The map in QGC requires an internet connection for initial download. Newer versions of the toolchain include pre-built map tiles in the installation package. If the map still does not display after installation, you can download the file: RflySim_QGCdefaultMap, then import it as shown below (choose "Replace existing map" in the pop-up dialog):

2.3.20 The QGC map background does not display properly during toolchain configuration verification. The flight environment interface and drone takeoff work normally.
Problem Description:

Answer:
You need to download the offline map on a computer with internet access, then copy it to the offline computer. For secondary development of the QGC ground station offline map feature, refer to: https://blog.csdn.net/qq_48597462/article/details/138273107
2.3.21 Is it possible to change the GPS coordinates of the aircraft's starting point during simulation?
Answer:
This feature is only available in the latest version of the RflySim Toolchain (full version only).
- Modify the last three parameters in the CopterSim .txt configuration file to set the scene center's base longitude and latitude.
- Set the parameters in the batch script. Refer to
RflySimAPIs\BatScripts\SITLPosStrGPS.batfor an example.
2.3.22 The CopterSim simulation frequency is 1000 Hz (MATLAB step size 0.001s), so the control rate is also 1000 Hz. But in my HIL setup, the servo is controlled via serial port and cannot run this fast, and the actual sensor update rate is also lower. When I increase the simulation step size, CopterSim runs too fast. If I simply reduce the control frequency, the system becomes unstable. How should this be handled?
Answer:
The control frequency is 250 Hz. The flight controller's internal filters do not run at 1000 Hz. While the simulation step is 1000 Hz, the data transmission frequency to the flight controller is approximately 250 Hz. You can set your controller's sampling rate to any integer multiple of 0.001s.
2.3.23 The QGC map background does not display properly during toolchain configuration verification. The flight environment works and the drone can take off normally.
Answer:
This is a network issue — the map is loaded online. This does not affect functionality, only the visual display. Try scrolling the map with the mouse wheel, or switch to a different map source. If you have internet access, try:
- Disable the network firewall and restart the QGC ground station.
- If step 1 does not work, reboot your computer.
2.3.24 Can previously modified files in the RflySimAPIs folder be recovered after a direct reinstallation without backup?
Answer:
There is a backup folder created during installation. However, if you have run the uninstaller, those files are permanently deleted.