So Im ready to run a full hardware in the loop simulation to test my APM, however the APM manual only talks about how to set up a simulation in X-Plane 9, but the planner Dose support Flightgear?

Can anyone help me set up my APM for a flight gear simulation and dose it work the same way X-plane 9 dose?


I would just get X-plane 9...But my laptop only has a 1.6Gz processor and you need like a 1.9 or 2.0Gz for X-planes to even run... =[


Thank you for any help you can give me!



Views: 7407

Reply to This

Replies to This Discussion

Hi Dronius,

I had a radio reciever connected to the APM for HIL Testing, This enabled me to check that I could select flight modes from my Transmitter (Futaba 9CAP). I also used it to set the Throttle Reverse. I had to do a combination of Reversing throttle, and Some of the surfaces to get the software to fly the plane properly. 

You do not need a joystick connected, but i believe you can control it via a joystick if you want.

Regarding your no throttle issue, It is probably because the APM is powering up on 100% throttle, therefore it will not arm, ensure that your Throttle is down, and reversed if necessary.

Somebody correct me if i'm wrong, But just noticed that you probably did upload the Arducopter software, as it says Arducopter in the top right in the drop down box (mins says Arduplane). Just simply Click plane again in the lower right as indicated, and this will overwrite the software currently on the board. 

I was using FlightGear 2.6, but my copy of Xplane 10 turned up so using that now (got it for 30 bucks from ebay!). However I have managed to get flightgear working.

Again, somebody correct me if i'm wrong, But make sure that you start FlightGear by clicking on the new file that you dropped into root of flightgear, the batch file. I guess if you click the batch file to open the flightgear, the Mavlink file gets used. 

I'm relatively new to this, so don't take what i've said as 100%, If someone can give a better answer, please feel free!

I created a thread about Xplane, but the principles and settings are similar, Have a read through this, may help

Excellent. Some more things to check out there. I will do that later today.

I did start it via the button that has the text label FG plane in the APM Planner. I did not start it via the .bat file.

Even if the image says arducopter in the image I have selected Arduplane on my PC. I just took the same picture posted on this thread earlier. I think that was Jasons picture. 

Update: I got HIL sim and Flightgear via APM planner 1.1.80 working.

Some information to other people that might try this:

  • I can confirm that APM planner 1.1.80 and Flighgear 2.6.0 works in HIL mode with APM1
  • I used Arduplane V 2.34 HIL for the tests (uploaded by the APM planner)
  • I use a Win XP Machine and a NVIDIA graphics card
  • NVIDIA cards are better than other graphics cards with Flighgear (from my experience)
  • Not having valid PWM inputs from a receiver to the APM (with a radio connected and an OK radio signal) may cause the APM to go into manual mode. Therefore no auto or FBW (Fly By Wire) modes are enabled on startup. This may cause confusion. 
  • Even if Xplane has a more polished interface, I think the Flightgear sim is better for RC and small drone testing and autopilot tuning. Reason: the way xplane models aerodynamics (lift etc) is not tailored to small aircraft (at least it was not in previous versions). In Flightgear the Rascal and other small aircraft models may be used. The rascal model has smaller wingspan, lower mass, lower lift, proper speed etc. If you try to simulate a large airplane in HIL mode your APM 1 PID gains probably will have to be set differently due to the high speeds necessary to avoid stalling. This will make it easier to miss waypoints etc.
  • Make sure you upload the HIL version of the firmware and be aware that there are TWO versions of the HIL firmware: one for copter and one for plane. The upload link in the APM planner is a bit confusing due to the underline on the upload link. Select the one to the left (HIL for plane). I have made an entry in the bugfix / request list over at google code for this. Not sure if it is looked into yet but it is in the list.


Can you confirm whether its possible/not-possible to fly APM 1 with HIL(arduplane) on FG2.0 without an RC controller ?

I need the RC controller to center the stick(trim it out) on the ground before the takeoff. Then i switch the controller off and the plane still flies well in AUTO mode(doing waypoints, RTL, LAND etc well). But, unfortunately, without the RC controller, I am not able to center the sticks (which always happen to be out of trim by exactly the same amount!). I have tried to trim via the parameter list in mission planner, and the laptop key controls of Flight gear but to no avail. Is there another solution to this problem ?

It's an old post but I'll just add a reply in case anyone else runs into this problem later.

The problem was that in performing Attitude HILS simulation on APM 1.4 with Flight gear, the aircraft was always out of trim(the sticks were not centered) even when the RC transmitter for HILS in manual mode was centered. 

The solution was obtained by connecting one of the 'servo pwm out' on the APM1.4 with the 'radio pwm in' on the APM1.4 board(The servo outs and radio ins are right next to each other where you would normally connect your servos and reciever). It causes the blue led near the ppm encoder to start blinking and the sticks get centered.  

I would like to know if anybody has FG working with MP  for arducopter mode in HIL  using the lattest versions of both MP and FG.

thanks in advance for your help



Hello Guys. can someone help me out. I am not able to find enough resources on the net. Basically i am trying to setup HIL with apm 2.5 arduplane and flightgear. Till now i am able to lauch rascal model in flightgear. mission planner is able to communicate with radio inputs as i can see on mission planner. I am also able to see aircraft parameters on mission planner however i am not able control the aircraft either in manual mode or auto. What is the missing link I am thinking it could be due to mission planner not able to command the flightgear. How can i debug this part.

Latest misstion planner and flight gear is being used with arduplane v2.68 HIL version.

Reply to Discussion


© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service