Hi All, 

I'm in the process of refactoring the runsim.py code to allow the use of FDM connectors that interface to JSBSim or XPlane, however in doing so I've hit a hurdle where SITL is behaving strangely.

Unfortunately I have no baseline of a correctly working FDM packet as the auto test suite also exhibited odd behaviour using JSBSim whereby the aircraft would rotate and pitch up, bank which either lead to a stall or a poorly coordinated turn resulting in the aircraft facing down and eventual crash.

Attached are the logs for a an aircraft on the runway.  Viewing Mission Planner while SITL is active and aircraft is on the runway has the AH indicating roll of about 10-15 degrees when actual should be 0.6 degrees.

Here is a snapshot of the values being packed into the FDM packet:

time (usec): 1401964722530685,
heading (deg): 166.509552,
roll speed (rad/s): 0.000000,
pitch speed (rad/s): 0.000000,
yaw speed (rad/s): 0.000000,
lat: 33.684734,
lon: -117.730003,
alt: 0,
vx: 0, vy: 0, vz: 0,
ias (m/s): 0, tas (m/s) 0,
x accel (m/s/s): 0.114370, y accel (m/s/s): 2.746574, z accel (m/s/s): -9.823327
pitch:-0.251376 roll:0.662242 yaw:180.111160

SIM entry in the data flash log:

Any ideas where it got 655.130 for pitch?

Also logging documentation indicates that pitch, roll, yaw values should be in centi-degrees, these don't seem to be logged in centi-degrees.

Corresponding mission planner view

Mission planner seems to plot the aircraft at the right location on the map, but reported values for pitch, roll, yaw seem to be all over the place and jittery:

I'm sure I'm must be passing a wrong value somewhere, or some other trivial issue.

Keen to get this working to give everyone a choice of using JSBSIM or XPlane for their SITL simulations.


-Michael Dove

Views: 282


Replies to This Discussion

Post this also to the dev google group drones-discuss, thx

Posted. Thanks for the tip Bill.



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service