px4-jsbsim-bridge icon indicating copy to clipboard operation
px4-jsbsim-bridge copied to clipboard

JSBSim acceleration properties

Open seanmcleod opened this issue 4 years ago • 5 comments

I noticed you're using the following JSBSim properties as the ground truth acceleration values.

https://github.com/Auterion/px4-jsbsim-bridge/blob/3c4d038c7c0c660909f37b429f4f583eec53ae93/src/sensor_imu_plugin.cpp#L76-L82

However those aren't the accelerations of the aircraft's cg, they include additional accelerations based on the pilot's position relative to the cg and angular rates.

https://github.com/JSBSim-Team/jsbsim/blob/eccfd64bbe09fc209c399bead031a8ccc5873118/src/models/FGAuxiliary.cpp#L206-L212

Unless the model has the pilot's position coincident with the cg at all times or the overall effect is small enough particularly with small UAVs that you don't care. In terms of body rates you are using the body rates around the aircraft's cg.

The accelerations of the aircraft's cg can be retrieved via the following JSBSim properties:

https://github.com/JSBSim-Team/jsbsim/blob/eccfd64bbe09fc209c399bead031a8ccc5873118/src/models/FGAuxiliary.cpp#L338-L340

seanmcleod avatar Oct 02 '20 12:10 seanmcleod