为什么不同设备的传感器值如此不同?

Why are Sensor values so different across devices?

我目前正在使用 android 设备开发一个应用程序,该应用程序使用传感器值来获取有关环境的信息。我使用的是 Samsung S6 Edge 和 Nexus 7 tablet,我从设备获得的传感器值非常不同。

一个例子:

这些是静止在 table 上的两个设备的陀螺仪值(x 轴)。这是值相似性最好的之一,它们中的大多数甚至都不接近。

一些不好的价值观相似之处:

磁场:

加速度计:

我想知道为什么不同设备的值如此不同?

谢谢。

I'm wondering why values are so different across devices?

它们并没有特别的不同。这些是 radians/second 中的值,其中“360 度转弯”约为 6.28 弧度。您的值范围从 ~-0.002 到 +0.004。 ~0.004 radians/s 是~0.229 degrees/s。这是。 IOW,你的值都类似于0.

此外,如 the documentation 所述:

In practice, the gyroscope noise and offset will introduce some errors which need to be compensated for. This is usually done using the information from other sensors, but is beyond the scope of this document.

更一般地说,不同的硬件将具有来自不同制造商的不同传感器。

关于加速度计,同样,您的值很小。地球引力9.8m/s2;您的值介于 ~0.15 和 ~-0.05 之间。

关于磁场...你的三星似乎搞砸了。