mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
adis16470: fix accel and gyro scaling
This commit is contained in:
@@ -375,13 +375,13 @@ bool ADIS16470::Configure()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_px4_accel.set_scale(CONSTANTS_ONE_G / 2048.f);
|
// accel: ±40 g, 800 LSB/g (16-bit format)
|
||||||
_px4_accel.set_range(40.f * CONSTANTS_ONE_G);
|
_px4_accel.set_range(40.f * CONSTANTS_ONE_G);
|
||||||
_px4_gyro.set_scale(math::radians(1.f / 0.1f)); // 1 LSB = 0.1°/sec
|
_px4_accel.set_scale(CONSTANTS_ONE_G / 800.f); // scaling 800 LSB/g -> m/s^2 per LSB
|
||||||
_px4_gyro.set_range(math::radians(2000.f));
|
|
||||||
|
|
||||||
_px4_accel.set_scale(1.25f * CONSTANTS_ONE_G / 1000.0f); // accel 1.25 mg/LSB
|
// gyro: ±2000, 10 LSB/°/sec (16-bit format)
|
||||||
_px4_gyro.set_scale(math::radians(0.025f)); // gyro 0.025 °/sec/LSB
|
_px4_gyro.set_range(math::radians(2000.f));
|
||||||
|
_px4_gyro.set_scale(math::radians(1.f / 10.f)); // scaling 10 LSB/°/sec -> rad/s per LSB
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user