3D Robotics

Creating a full hardware-in-the-loop simulator

If you want to create a full hardware-in-the-loop simulator, where a flight simulator program on your PC simulates the ArduPilot sensors and GPS while ArduPilot flies the plane in the simulator, you've got to have a pretty sophisticated bit of gear between ArduPilot and the PC. It needs to take the serial output from the flight sim and feed it to ArduPilot as GPS and XYZ sensor data, and then take the servo commands from ArduPilot and feed that back to the PC as joystick commands. Jordi did it with some custom (and relatively expensive) gear here (using this ARM board), but it would be cool to have a cheap dedicated board that we could sell that would make it easy for people. We don't have time to develop this ourselves right now, but if someone wants to take a crack at it, the functional diagram is above. If you can design and test it, we'll manufacture it! [Note: you can also design simpler simulators: 1) "Half-duplex": This is just the above diagram, but without the return loop of reading the servo outputs and sending them back to the flight simulator as joystick controls. In that case, you could put a "human in the loop" and just copy the rudder/aileron movements yourself, tilting the joystick to reproduce what the autopilot is doing. Not perfect, but better than nothing. 2) Navigation only: this is the easiest form and just requires the FTDI cable you already have. Just have the flight simulator send its GPS coordinates to the serial port, and ArduPilot will read them and think that's where it is. Once again, you can move the joystick to reproduce ArduPilot's steering and see how the system responds. No sensors or stabilization, but it's a good way to test navigation algorithms.]
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Developer
    Boeing Subsonic Tunnel @ Purdue, 4'x6' test section, max speed 250 mph, perfect for RC aircraft, we don't have to do any scaling, :-)
  • @James - Awesome !
    what wind tunnel facility is that?
  • Developer
    Our datcom based FlightGear dynamic model for the EasyStar is almost complete. We are now verifying the datcom coefficients in the wind tunnel. The current model flies but I had to manually input the roll damping due to some problems with the vertical tail showing up in the datcom aerodynamics. The flightGear model is in the oooark tree under data.

  • There is an existing EasyStar model for FlightGear. Perhaps you could use/tune that.
  • Nice James!
    This is my rough version of EasyStar for x-plane ( used it with LabVIEW - Xplane flight simulator ...). It still needs some parameter tuning to have ES flight characteristic...


    and in flight over SF bay

  • 3D Robotics
    Looking good, James. Let us know when it's ready to use...
  • Developer
    Working on the jsbsim model for the easystar still. Using datcom+ with jsbsim is a bit tricky. Have gotten a visual model togther in the blender though. Shouldn't be long before this is flying in flight gear.

  • Developer
    Well we haven't tested it yet, but we have the initial datcom output/ jsbsim model. I'll see how far I can get on the jsbsim interface for scicos this week. Here is the paper on the easystar datcom model. http://www.purduehsl.dynalias.com/uploads/papers/UVG_S10.pdf
  • 3D Robotics
    Nice one! How's that EasyStar model coming?
  • Developer
    I ended up moving to scicoslab since it was more stable for controller design. Here is the result.\
This reply was deleted.