I am using JSBSim and Flightgear in my research for visualization of path planning.
The simulation is run in JSBSim/FG, some data is saved into a file from JSBSim, and then real time optimization is run to get the next control action.
I have been using this command when starting JSBSim+Flightgear: --fdm=external --native-fdm=socket,in,120,,5501,tcp
This way I am able to control the aircraft from an external script (which is what I need for my simulations).
The problem is that the airplane does not know where the ground is, and as a result it cannot land "visually" correctly.
I believe that this is a result of the separation of the FDM and the terrain information in FlightGear.
Is there any way to get the external mode to work so that the ground is detected?
I found that another way of staring JSB and FG is: --fdm=jsb --native-fdm=socket,in,120,,5501,tcp .
This seems to directly incorporate the JSBSim FDM into the simulation, and JSBSim and FlightGear share information and the ground reactions are correct.
However, when running it this way I cannot control the UAV from socket and the JSBSim logging stops.