Level Horizon Issue in HITL using X-plane10

Hello guys,

I’m having a bit of a problem with HITL. I’m using X-plane10 with PX4, qgroundcontrol and Pixhawk to simulate the HILStar model. I’m doing this to learn how to tune a fixed wing scratch build in flight.

The problem is: after a minute of running the simulation, the level horizon and attitude of the HUD in the qgroundcontrol changes to be different that those in the x-plane. (It’s like you are putting the pixhawk inverted and titled in an airplane and moving it in flight inside the plane). This causes the airplane to flip and dive trying to align itself with the qgroundcontrol’s false level horizon when I put it in stabilize/ any automated mode other than manual.

Could you please help me if anyone came across such a problem? :smile:

P.S: I tried changing the “Flight models per frame” parameter in x-plane from 3 to 10 as all tutorials recommended to increase this parameter. (for some numbers this issue appeared faster and more aggressive than others)
Also, I tried using another pixhawk board to eliminate the possibility of error from it. (I used Pixhaws 1 and Pixhawk cube but the same issue appears).

My hunch is that something with the sensor data or timing is off and the estimator diverges. Does this happen with 1.9.2? And has it happened with 1.8 as well? Or is there some older configuration where it worked?

I think so, but is there any thing that I can do to over come this?

I guess you are talking about the px4 firmware. When I upload the firmware to the pixhawk, the qground asks me whether I would like to upload the master version, the beta, or the developer version. I upload the master as it’s the recommended one. [I guess the qground uploads the newest release of it]

Ok, and has this worked in the past?