change the range of accel
This commit is contained in:
parent
08fb1a425f
commit
c5a4161b9c
|
@ -37,6 +37,6 @@ IMU 包/小包,是一组 IMU 数据。
|
|||
| Description | 序列号 | 时间戳 | 指定传感器类型 | IMU 的温度 | 陀螺仪或陀螺仪 x y z 三轴的值 |
|
||||
|
||||
* 加速度计和陀螺仪的计量值换算成物理值公式: **real = data * range / 0x10000** 。
|
||||
* 加速度计量程默认值为 **8 g** ,陀螺仪量程默认值为 **1000 deg/s** 。
|
||||
* 加速度计量程默认值为 **12 g** ,陀螺仪量程默认值为 **1000 deg/s** 。
|
||||
* 温度计量值换算成物理值公式: **real = data / ratio + offset** 。
|
||||
* ``ratio`` 默认值为 **326.8** , ``offset`` 默认值为 **25℃** 。
|
||||
|
|
|
@ -52,9 +52,9 @@ void Motions::SetMotionCallback(motion_callback_t callback) {
|
|||
imu->temperature = seg.temperature / 326.8f + 25;
|
||||
|
||||
if(imu->flag == 1) {
|
||||
imu->accel[0] = seg.aceel_or_gyro[0] * 8.f / 0x10000;
|
||||
imu->accel[1] = seg.aceel_or_gyro[1] * 8.f / 0x10000;
|
||||
imu->accel[2] = seg.aceel_or_gyro[2] * 8.f / 0x10000;
|
||||
imu->accel[0] = seg.aceel_or_gyro[0] * 12.f / 0x10000;
|
||||
imu->accel[1] = seg.aceel_or_gyro[1] * 12.f / 0x10000;
|
||||
imu->accel[2] = seg.aceel_or_gyro[2] * 12.f / 0x10000;
|
||||
imu->gyro[0] = 0;
|
||||
imu->gyro[1] = 0;
|
||||
imu->gyro[2] = 0;
|
||||
|
|
2
third_party/glog
vendored
2
third_party/glog
vendored
|
@ -1 +1 @@
|
|||
Subproject commit a97d6b0e1ce34e4e1956c63de8ddd325ff164512
|
||||
Subproject commit 8d7a107d68c127f3f494bb7807b796c8c5a97a82
|
Loading…
Reference in New Issue
Block a user