Simulation of quadrirotor in hil mode with xplane

Hi everyone,

I’m trying to simulate a quadrirotor in hil mode with xplane simulator(imposed). The hardware target is pix32v5.
Xplane data are converted to mavlink message every 25ms.
2 messages are generated (hil_sensor and hil_gps).

Everything work fine, but after a certain delay (between 15s and 45s) after start sending xplane data ,
estimated angular speed(on 3 axis) diverge while oscillating and go Nan(visible in mavlink message attitude quaternion).
After that, flight controller enter in degraded mode.

I don’t understand why this divergence and i don’t know howto resolve this problem.

I have checked:

  • Sampling regularity of sensor data
  • Raw data arriving in the flight controller
  • Vibration metrics (<0.04ms)

Any suggestions?

I have resolved the problem by changing the following parameters
IMU_ACCEL_CUTOFF, IMU_DGYRO_CUTOFF and IMU_GYRO_CUTOFF to the following value: 50 Hz

1 Like

Hi, @big
I need to setup a HIL simulation between QG 4.2.3 and Xplane11. Since QG no more supports Xplane for HILs, have you established the bridge between PX4 (QG) and XPlane yet?
I’d greatly appreciate if you’d share it with me. :pray: :pray:

Hi,@islamelnady
As i said in thread HITL & X-plane 11 & QGroundControl,
it’s part of a huge tool and i can’t share it.
But in the related thread, i explained where i started and some others importants stuff which help you to reproduce the bridge.
Note: this thread is also important.