AP_InertialSensor: rotate acccel/gyro for PXF

This commit is contained in:
Andrew Tridgell 2014-07-07 09:50:01 +10:00
parent f6bba74fb6
commit 848b563fc3

View File

@ -295,6 +295,10 @@ bool AP_InertialSensor_MPU9250::update( void )
_accel[0].rotate(_board_orientation);
_accel[0] *= MPU9250_ACCEL_SCALE_1G / _num_samples;
// rotate for bbone default
_accel[0].rotate(ROTATION_ROLL_180_YAW_90);
_gyro[0].rotate(ROTATION_ROLL_180_YAW_90);
Vector3f accel_scale = _accel_scale[0].get();
_accel[0].x *= accel_scale.x;
_accel[0].y *= accel_scale.y;