SITL JSBSim + FLightGear

Hello all,

I have a little esthetical problem.

I built a custom plane model using JSBSim flight dynamics model and xml instructions to work in FlightGear. The geometry model is defined to the detail of functioning flight control surfaces, landing gear, fuel jettison and etc. In summary, all works perfectly when I run Flight Gear as a stand-alone flight sim.

When I run SITL and interface it with FlighGear, the vehicle follows the expected flight dynamic model and the flight plan as expected. However, the flight control surfaces (ailerons, rudder, elevator) and the landing gear seem to be fixed or not receiving explicit commands from the ArduPilot / Mission Planner side.

Hypothesis:

  1. ArduPilot / MIssion Planner does not send control surface level instructions across the SITL interface, it just uses the flight dynamics model to process the plane´s position and attitude in time.

  2. ArduPilot sends control surface level instructions, but they are failing to be communicated to FlightGear to interpret the control surface movements.

Which is it? I am suspecting that the 1st explanation is the likely answer, but I would appreciate someone knowlledgable about the interface to confirm.

Does X-Plane or Real Flight 8 simulate control surface movements throught the SITL interface?

Is HITL the right approach to see the effect I want to see in the simulation?

Thanks

Cem

The problem magically resolved itself when I increased the frequency of communication from the typical 10hz to 30-60hz on the following standard call options to FlightGear:

–native-fdm=socket,in,30,5503,udp ^
–fdm=external

I also added the following line in the body of the main Jsbsim xml file for the aircraft’s flight model (ie Rascal.xml)

output name=“localhost” type=“FLIGHTGEAR” port=“5503” protocol=“udp” rate=“30”/>

I think these changes should be part of the standard .bat and .py scripts in the SITL folders and Rascal’s flight model in ArduPilot.