My favorites | Sign in
Project Home Downloads Wiki Source
Testing the firmware in Hil mode with AeroSIM-RC.
Updated Mar 4, 2012 by


Here you will find a good and cheap method to test yourself the ArduCopter firmware in HIL (Hardware In the Loop) mode with the AeroSIM-RC simulator.


Hardware requirement:


  • Unzip the archive
  • copy the folder \APMHill in the AeroSiM folder c:\Program Files (x86)\Plugin\

  • copy the quadcopter model MD4.mdl in the AeroSiM folder c:\Program Files (x86)\Data\
  • check that in the firmware the parameters of the APM_Config.h are set, then upload the firmware to the APM:

  #define X_PLANE 	ENABLED

  • upload the AC241xp2_MD4_HIL.param (found in the ArduCopter_HIL_setups\AeroSim_Hill folder ) with the mission planner to your APM board.


  • launch the APM mission planner
  • click on the Tab simulation
  • click on CONNECT on the top right corner
  • click on the button AeroSim and set the parameters as below:

  • click on the Tab Configuration, do the stick calibration
  • click on the Tab Mode, set the MODE
  • click again on the Tab simulation
  • click on Start simulation
  • launch the AeroSIM-RC then select Plugin and APMHil
  • select the model MD4

Enjoy flying with AeroSIM in HIL mode

You will find some videos of HIL simulations at:

More infos at:

Enjoy with the HIL simulation with AeroSIM-RC...

Regards, Jean-Louis

Comment by, Jan 17, 2012

One big Question: Do i steer my virtual Copter with my rc radio?

I cant get it to work, and dont know why.

I did all u write, but if i start the script, my virtual Copter is staying still.

And i cant steer it with my RC so i cant arm and fly it.

where can i search for the problem? maybe windows7? what can i do? maybe the communication between the MP and Aerosim is not working? how can i test it?

Comment by project member, Jan 19, 2012

To succeed in the connection in HIL mode with the simulator you need to succeed to get a good UDP connection through the network. So, may be that your problem is due to your fireware and/or your antivirus. You need to unblock the UDP connection of the APM Mission Planner. When the first time you install the Mission Planner, it ask you to unblock the network, you need to answer YES... if you answer NO, the connection between the Mission Planner to the AeroSIM doesn't work. You need also that your PC computer need to be connected to a network (a router, the ethernet and/or the internet). I hope this will help you, Regards, Jean-Louis

Comment by project member, Jan 19, 2012

If you use a transmitter and a receiver connected to the APM board, you need to do a full calibration of the PPM signal. Go to the Configuration/Setup tab and do a full sticks calibration, then you need to set the modes for the Ch5 switch of your transmitter. To start the motors, the throttle must be to zero and then the yaw to full right for about 5 seconds. Regards, Jean-Louis

Comment by, Mar 18, 2012


I am trying to get HIL working with AeroSIM-RC, i am using the the RC radio to control this, have done the radio calibration however i am having a problem with the gain as it seems to be biased. When i use a big gain (10000) the copter doesnt take off (not enught power) and when i use a smaller one (4000), i am not able to take the throttle to 0 (for Aerosim to takeoff). Is there any other configuration i need to do in AeroSIM?

Comment by, Jan 22, 2013

I'm getting an error saying 'AP_Int16 does not name a type' when I upload the firmware. any ideas?

Comment by, Apr 9, 2013

Hi I don't see how to do the last step before testing: I mean "upload the AC241xp2_MD4_HIL.param" any one can help?

Comment by, Apr 12, 2013

Hello. I have a problem. I am able to control de md4 except fot the throttle. Everytime i start the simulation the MD4 goes up without control. I dont know where the problem is, I am following the steps as you indicate in this tutorial Thank you!


Comment by, May 28, 2013

Can i fly any quad model that is available in AeroSim? or just this MD4 only?

Comment by, Jun 4, 2013

It's not compiling throwing errors in arduino_Ardupilot..

Comment by, Jun 15, 2013

Anyone know if its possible to HIL simulation with Arducopter 3.0 and AeroSIM-RC? Does the above instructions still apply?

Comment by, Oct 14, 2013

Jean Louis This is something I would like to do so that I can practice Mission Planner before actually doing it for real. However, I see that the instructions are not very clear for a non techie person like me. For instance we are told to COPY certain files.. OK but we are not told where to put them or how. Knowledge is assumed and in a lot of cases this is not correct. I would dearly like to contact someone who has done this and would be willing to tell me exactly how to do it in very simple words. I am very frustrated.

Sign in to add a comment
Powered by Google Project Hosting