Great project Thankyou!
I got into FlightGear because of its use as a SITL viewer in ArduPilot.
Anyway after studying the ArduPilot source and also reading up on FlightGear and the FlighGear source, it seems that the way ArduPilot does it is kind of complicated:
https://github.com/ArduPilot/ardupilot/ ... JSBSim.cpp
... so I have been looking at a simpler way and it seems that it will work:
I use the readymade FlighGear telnet interface for sending in flight surface positions to FlightGear and the native_fdm out interface for reading the aircraft pose and environment data back in one big binary chunk,
All this was based largely on the examples in the FlightGear source code. Thankyou for those:
https://sourceforge.net/p/flightgear/fl ... es/netfdm/
https://sourceforge.net/p/flightgear/fl ... client.cxx
( though the netfdm is input to FlightGear rather than output, but I used it to get things started as shown here
I eventually got a demo working, which seems to meet the basic SITL requirements :
https://github.com/kwikius/fg_ext_fdm/b ... /io/io.cpp
So far all it does is read a joystick and send the controls in to FlightGear via telnet then read the net_fdm struct and output some of its data on the console, but things seem to be working. I can fly it around and FlightGear works pretty much as normal. The interface also seems relatively simple to understand compared to the ArduPilot version and I hope I can hook up my version of ArduPilot into this without too much difficulty.
Ideally someday I would like to make a custom FlightGear HUD as near as possible to the OSD as shown here:
but that is some way down the road!
Anyway, if I get any further with it I will keep you posted.
regards
Andy