加速度计的最小值和最大值范围和传感器数据转换 [英] Accelerometer's Min and Max value range and sensor data conversion

查看:31
本文介绍了加速度计的最小值和最大值范围和传感器数据转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有摩托罗拉的 moto g 16 GB 设备.它有 LIS3DH 3 轴加速度计.

I have moto g 16 GB device from Motorola. It has LIS3DH 3 axis Accelerometer.

为了读取加速度计的最大值和最小值,我使用了这个 API.

For reading Max and Min value of Accelerometer i have used this APIs.

getMaximumRange()

有人说它的显示零选择pick to pick

但对于我的设备,我得到了价值 39.24

But for my device i get value 39.24

所以我虽然 39.24/9.8 = ~4.00 s 我的范围是 +/- 4g

so i though 39.24 / 9.8 = ~4.00 s my range is +/- 4g

但是当我简单地读取 x、y、z 数据并将其存储在文件中并查看为我的智能手机提供最大加速度时的值时,它显示的值高达 76 m/sec2

But when i simply read x,y,z data and store it in file and see the values when giving max acceleration to the my smart phone then its shows values up to 76 m/sec2

这是什么意思?

这是我设备的错误吗?

如何将此值转换为 +- 2g 值.我的算法想要 +-2g 格式的值如何给出?

how to convert this values in +- 2g values. my algorithm wants value in +-2g format how to give that?

如何对传感器数据值进行截取或下采样?

how to perform cut of or down sampling of sensor data values ?

推荐答案

moto g 具有动态可配置的传感器.最初它被配置为 4g 模式.但是当你给你的手机提供更多的加速度时,它会改变它的传感器模式并切换到 8g 并且你仍然提供更多的加速度然后它会自动进入 16g 模式.一段时间后它会回到4g模式.

moto g has dynamic configurabale senser. Initially it is configured in 4g mode. But when you gives more acceleration to your mobile it changes it sensor mode and switch to 8g and still you give more acceleration then it gest 16 g mode automatically. After some time it get back to 4g mode.

您可以在此范围更改时在 Sensocr Accurcay 上进行更改回调.

You can have on Sensocr Accurcay change callback on this range change.

这篇关于加速度计的最小值和最大值范围和传感器数据转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆