Could someone be kind enough to explain how ArduPlane, Jsbsim and Flightgear interact in a SITL simulation?
Is MavLink the only outbound and inbound instruction language for ArduPlane?
Here is what I think is going on, but I would like someone to confirm as it may shed light on an underlying issue that I am trying to solve.
At each instance of the simulation time loop,
- ArduPlane sends instructions at control surface and/or servo level to JSBSim or whatever DFM there is.
(What do these intstructions look like, how can I track them down?)
- JSBSim / DFM adjusts the vehicle control surfaces. Then it runs the aerodynamics and 6 degree of freedom body dynamics calculations and obtains a new vehicle attitude, displacement, velocity and rotation rates.
(What do these intstructions look like, how can I track them down?)
- JSBSim / DFM sends the new state information to ArduPlane and potentially to a Flight Simulator (i.e. Flight Gear) which update the vehicle position and attitude in the global coordinate system.
REPEAT ABOVE
I use ArduPlane, Jsbsim and Flightgear for SITL and simulations run smoothly, but without any control surface movements. This used to be an esthetical concern, but now I need to visualize things for debugging purposes.
So I am trying to track down what servo or control surface instructions arrive at JSBsim or Flightgear, so that I can map them to control surface positions within FlightGear. So far, I only see the throttle values updating and the vehicle flies as expected - which confirm that instructions are arriving and the loop is healthy…
I tried to track down what the ArduPlane instructions for aileron, elevator and rudder or rc1, rc2, rc4 look like using a linked Mission Planner, but the effort has been fruitless.
There is absolutely nothing broken in the way SITL works and my pain point is the inability to see the type and syntax of the instructions that flow among the 3 software packages (4 with the mission planner). I tried to utilize and play with an old protocol Mavlink.xml that @Tridge had prepared for HIL with Flightgear, but it doesn’t seem to change anything (https://ardupilot.org/dev/docs/flightgear-hardware-in-the-loop-simulation.html). Clearly it is for HIL, not SITL…
Any insight would be greatly appreciated. I will contribute what I learnt and was able to implement with success on wiki pages.