diff --git a/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp b/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp index 4fef1647922..14cf4b945ff 100644 --- a/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp +++ b/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp @@ -801,13 +801,13 @@ void ICM42688P::ProcessGyro(const hrt_abstime ×tamp_sample, const FIFO::DAT } if (!scale_20bit) { - // On the 686, if highres enabled gyro data is always 65.5 LSB/dps - // On the 688, if highres enabled gyro data is always 131 LSB/dps + // published data is the 20 bit value shifted right by 1, so it spans the full range in + // 2^18 counts: 65.536 LSB/dps on the 686, 131.072 LSB/dps on the 688 if (isICM686) { - _px4_gyro.set_scale(math::radians(1.f / 65.5f)); + _px4_gyro.set_scale(math::radians(4000.f / 262144.f)); } else { - _px4_gyro.set_scale(math::radians(1.f / 131.f)); + _px4_gyro.set_scale(math::radians(2000.f / 262144.f)); } } else { @@ -819,7 +819,7 @@ void ICM42688P::ProcessGyro(const hrt_abstime ×tamp_sample, const FIFO::DAT } if (isICM686) { - _px4_gyro.set_scale(math::radians(2000.f / 16384.f)); + _px4_gyro.set_scale(math::radians(4000.f / 32768.f)); } else { _px4_gyro.set_scale(math::radians(2000.f / 32768.f)); diff --git a/src/drivers/imu/invensense/iim42652/IIM42652.cpp b/src/drivers/imu/invensense/iim42652/IIM42652.cpp index cedd6bfe44c..757f8c2113b 100644 --- a/src/drivers/imu/invensense/iim42652/IIM42652.cpp +++ b/src/drivers/imu/invensense/iim42652/IIM42652.cpp @@ -777,8 +777,9 @@ void IIM42652::ProcessGyro(const hrt_abstime ×tamp_sample, const FIFO::DATA } if (!scale_20bit) { - // if highres enabled gyro data is always 131 LSB/dps - _px4_gyro.set_scale(math::radians(1.f / 131.f)); + // published data is the 20 bit value shifted right by 1, so it spans the full range in + // 2^18 counts: 131.072 LSB/dps + _px4_gyro.set_scale(math::radians(2000.f / 262144.f)); } else { // 20 bit data scaled to 16 bit (2^4) diff --git a/src/drivers/imu/invensense/iim42653/IIM42653.cpp b/src/drivers/imu/invensense/iim42653/IIM42653.cpp index d25f37fef1c..be6af1ed954 100644 --- a/src/drivers/imu/invensense/iim42653/IIM42653.cpp +++ b/src/drivers/imu/invensense/iim42653/IIM42653.cpp @@ -778,8 +778,9 @@ void IIM42653::ProcessGyro(const hrt_abstime ×tamp_sample, const FIFO::DATA } if (!scale_20bit) { - // if highres enabled gyro data is always 65.5 LSB/dps - _px4_gyro.set_scale(math::radians(1.f / 65.5f)); + // published data is the 20 bit value shifted right by 1, so it spans the full range in + // 2^18 counts: 65.536 LSB/dps + _px4_gyro.set_scale(math::radians(4000.f / 262144.f)); } else { // 20 bit data scaled to 16 bit (2^4)