Hi Tom,
first of all I have to say: Great autopilot, and especially great ground control station. I really like the functionality and opportunities of it. It's nice what you have managed the last few years. So now to the reason of my post:
If you are still interested in creating a HIL simulator with FlightGear I might help. Last week I have successfully accomplished a working hardware-in-the-loop simulator with FlightGear and my own Autopilot (not Gluonpilot).
Short explanation what I've done:
My setup takes the following sensor data of FlightGear and sends them to the autipilot:
- Roll, Pitch, Yaw
- Rollrate, Pitchrate, Yawrate
- Altitude, Airspeed, GPS (North, East)
The autopilot is believing it flies really in the air and is creating the actuator outputs (PWMs) depending on its attitude. These outputs will be send back to Flightgears Aileron, Elevator and Rudder controls. The update rate of sensor data and actuators (PWM Signals) are all 50ms = 20Hz.
I managed the communication via a C# socket parser. So Flightgear is talking to the parser over a socket (TCP), and the parser is transferring the data into UART messages, sending and receiving them to and from the autopilot.
FlightGear also provides accelerometer and gyroscope data, so it is also possible to input data before the Kalman filter and let the filter calculate the roll, pitch, ... data. This gives you the opportunity to compare and check the functionality of the filters attitude output o the autopilot with the real attitude created by FlighGear.
I have no problems displaying the simulation; in fact even with the small update rate of 20Hz it runs very smooth. It's really funny and cool to simulate the hardware and the PID controllers with FlightGear, cause it provides you with such great functionality. E.g. you can test your system from light to heavy wind, can test landing and start algorithms from an airstrip, ...
If it's still a matter of concern I am looking forward to help you if there are any questions.
Regards,
Manuel