After our flight testing was halted by a blown ESC I decided to start work on Software/Hardware in Loop (SIL/HIL) testing. As I pointed out in previous posts we plan to use APM to control multiple autonomous vehicles, all cooperating to various degrees. Before we can safely test such systems outdoors, especially given our constrained operating area, we need to test them in simulation. Prior to our purchase of APM we had been using X-Plane as a simulation environment for some time and so we were pleased to see the existing HIL system provided by the Mission Planner. The problem with this system from our perspective is when simulating multiple vehicles not only do we need multiple copies of X-Plane running (a problem we've always had, hopefully mitigated in X-Plane 10!), but we need multiple Mission Planners running as well.
The solution we came up with was rather than use X-Plane's native UDP data stream, write a plugin for X-Plane which automatically generates the correct MAVLink HIL messages that APM is expecting and outputs them over a network (SIL) or serial port (HIL). As of today I have finished v0.8 of this plugin which is compatible with ArduPlane in SIL mode. Future revisions will support ArduCopter and HIL.
For initial testing you can use the Mission Planner to connect to the telemetry port (TCP port 5763) to interface with APM the same way as you would in flight.
For more information or to download the plugin click here.