Using simulator AeroSIM RC for Autopilot / IMU development

AeroSIM RC is a flight simulator with FPV functions (OSD, camera Tilt&Pan, Scenario Generator from satellite image)


And now, it is also a Test Platform for Autopilot / IMU developers


Version 3.3 includes a new feature called "Third Party DLL" that lets autopilot/IMU developers run their software within the simulation, allowing experimentation with any kind of automatic control over the flight.


Some Applications include:

- Development of automatic pilots for navigation or flight stabilization

- Development of low cost Inertial Measurement Units (IMU) based on accelerometers, gyros and magnetic compass.

- Dump flight parameters to a file.


Explained by example.

The example included in the installation package is a simple autopilot that controls the model bank angle by operating the ailerons to keep the model level (allowing at the same time to control the ailerons with the stick)

See the source code here: ThirdPartyDLL.h and ThirdPartyDLL.cpp



1. You write a DLL consisting basically on a function that will be called from AeroSIM RC at each simulation integration step.

2. The data received by this function are all the variables related to the flight (position, velocity, acceleration, angles, height above the ground and stick positions)

3. The function returns a structure with data to optionally overwrite the stick positions, thus controlling the model by your software.


Feel free to download and try the simulator.

If you need help please ask!


Manuel Guillén
Author of AeroSIM RC

Views: 3058

Reply to This

Replies to This Discussion


Thanks for the post! But I'm not sure I quite understand how we would use this for autopilot/IMU development. The way other sims that we use (like FlightGear and Xplane) work is that they have a configuration screen where you can choose which output data it sends via serial port and which control data it accepts via another serial or tcp/ip port. You don't need to write any code for them. I'm not quite sure how your dll process compares to this, but it seems more complicated. Am I missing something?


You are the expert here. I thought that adding this capability to the simulator would be interesting for some of you in the forum.

The DLL is already written for you (it is the example provided). All you may want to do is replace the code that runs the sample autopilot with your own code.

Perhaps the benefit of using AeroSIM RC is the quality of the flight performances of the models, and that it lets your code run very tightly coupled with the simulation, since it injects your code directly in the simulation loop.

There are several approaches for equipment development such as autopilots and IMUs:
1- Doing flight tests with the real aircraft and the real equipment under development.
2- Replace the real aircraft with a simulated one running on a PC (and connect the real equipment to the PC)
3- Replace also the real equipment under development with a simulated equipment that runs the same code as the real equipment will.

Approach 2 would require to write in the dll the particular comms code for your equipment, e.g. serial or tcp/ip.
Approach 3 has some advantages in the early stages of development:
- Everything is simulated, so no need for the hardware yet, just the PC.
- New ideas and algorithms can be easily experimented and validated in the simulated environment.
- The code written in the dll, developed and validated in the simulation, is the same one you need to run in the real hardware. Just recompile the source for your specific hardware.


I can only congrat Manuel to have opened AeroSimRC for a custom dynamic library. Let me express it by a simple equation:

AeroSimRC + PixelQi Netbook = RC field computer.

Here are some arguments why (last post on this page):

In the meantime I bought a copy of AeroSimRC, wrote my KixHILS DLL, and enjoyed a substantial speed up in the development of the AR7212x autopilot. I give AerosimRC 5 stars for the specific purposes in this Forum. My recommendation: Just play with it and you will see why. Most important is an easy changability of model parameters. I changed the Nimbus in AerosimRC so that it does "feel" like my Alpina 4001 also in aerobatic manoevers.

I see a DLL advantageous for hardware in the loop simulation because one does not need to add a single line of code to the autopilot part in the micro. Instead, all code adaptations can be done in the DLL on a larger computer (PC) not as resource-limited as an AVR. This allowed, for example, to send GPS and AHRS info to the AR7212x even in the special format streamed by the Kixrazor. The alternative is what you mentioned, Chris (and then teaching a resource limited AVR to read the simulator) or to do the changes in the simulator code itself, requiring to work though lots of pages of open source. I think for most with some programming experience it is more convenient to do it via DLL.

The KixHILS for AeroSimRC is written in Bob Zale's PBWin9. It uses only one Com Port. It receives a kix-encoded DX7 frame from the AR7212x and sends back kix-encoded GPS and AHRS to the AR7212x. Kix enables to do this real time even at limiting 9600 bps. For higher communication speeds it can be easily adopted to be compatible also with ArduPilotmega .

Cool Manuel

Enter the T3 and show us what you mean!!!

Let's call it PLUGIN (DLL sounds like something complicated)

Download AeroSIM RC v3.5 and try the Ikarus OSD PLUGIN.

Ikarus OSD is a new OSD, with AutoPilot, and Ground Station (more info at

Ikarus OSD source code was rehosted as a PLUGIN for AeroSIM RC this way:
- 70% of the original source code was nearly unchanged (with minor changes using #ifdef)
- 25% of the original source code is not used because data is provided by the simulator in a clean way (GPS data, voltages/current/RPM, IMU data, etc.), and the code to acquire the data is simply not necessary.
- Only 5% of the source code had to be written specifically to work with the simulator.

- you can do 1000 flight tests while it is raining outside
- you do not crash your beta tester´s models
- you can easily log all data for analysis
- you can set breakpoints in the code and pause the flight for debugging

I think that THIS IS A GIFT for developers reading this forum.

See the source code for the Demo Plugin (included with AeroSIM RC) if you still do not understand HOW EASY IT IS


The first version of the OSD644DMD plugin is now ready for download from the usual simulator download page

The guys from DMD are also preparing a new plugin of the LRS 2.52 system with a very interesting features, such as the STAB mode, which overrides the pilot control inputs in case the pilot will crash the airplane. The beta testers are having a lot of fun trying to crash the airplane (in the sim, of course!), while the LRS algorithms identify when to override pilot inputs to save the airplane.

The combination of AeroSIM RC + LRS plugin is a great training system for beginner and professional users to protect their investment (that's what simulators were invented for!)

This video shows how the pilot tries to crash the airplane during landing by pushing the elevator stick, but the system reacts overriding pilot's controls in the last moment.


This is how the OSD644DMD plugin looks like in the simulator:

Hi guys!

I've tried all the simulators that work with the APM and I can say that the AeroSim-RC worked best for me. 

However, I downloaded the free version from the official website and it only allows for 2 minutes of flight which is kinda annoying. After that it requires for some USB cable which I guess I would get by buying the simulator with the licence. 

Buying it won't be a problem as long as I would know for sure that I will still be able to use it with the APM and the Ardupilot. 

Please let me know if this is possible and how.



Thank you for your compliments.

It is a pleasure for me that my simulator is being used for such interesting developments.

The USB cable acts as a dongle to override the two minute limit in the free mode, and also works as an input interface for the transmitter.

You can buy the simulator at the best price directly from us here AeroSIM RC DIRECT 

To date, I am not aware of any issue with plugin integration, and if there were any issue in the future, I offer my help to work with the plugin developers in any future issue.

Actually, I am always happy to add new data or features when required by plugin developers.
The fact is that they are technically very competent, and the plugin system already covers most of their needs.

Author of AeroSIM RC


© 2014   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service