Android磁传感器对不同设备给出不同的值

发布于 2024-12-19 22:48:07 字数 814 浏览 2 评论 0原文

我正在尝试进行分析,其中涉及解释 Android 设备各种传感器的结果。现在我正在分析磁场传感器,它应该告诉我(根据此文档页面)环境磁场的值在UT (微型特斯拉)。到目前为止,一切都清楚了,但在我测试的 2 台设备(Galaxy S、Galaxy Gio)上,结果不同。我所说的不同是指非常不同。

例如,在桌子上具有相同的方向,这些设备显示的内容如下(仅一个示例):

S2:  -2,12, 60 (approximate values on x,y,z accordingly)
Gio: -2,12,-36 (approximate values on x,y,z accordingly)

即使我切换位置,结果也是相同的。我还在此页面上阅读了有关磁场强度的内容,我相信考虑到我的地理纬度,我应该有大约 50uT。

谁能解释一下这些传感器的含义吗?

有人知道如何解释这种行为吗?

谢谢你,

尤利安

I am trying to do an analysis which involves interpreting the results from the various sensors of the Android device. Right now I'm analyzing the magnetic field sensor which should tell me (according to this documentation page) the values of the ambient magnetic field in uT (micro Tesla). Everything is clear so far but on the 2 devices that I tested on (Galaxy S, Galaxy Gio) the results are different. And by different I mean very different.

For example having the same orientation on a table here's what those devices show (just one example):

S2:  -2,12, 60 (approximate values on x,y,z accordingly)
Gio: -2,12,-36 (approximate values on x,y,z accordingly)

Even if I switch positions the results are the same. I also read on this page about the intensity of the magnetic field and I believe that I should have around 50uT given my geographical latitude.

Can someone explain what those sensors mean?

Does someone know how to explain this behavior?

Thank you,

Iulian

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风筝有风,海豚有海 2024-12-26 22:48:07

我只能确认这个问题。

作为稳定指南针应用程序的作者,我做了很多工作使用不同设备对磁场传感器进行测试。我发现其中一台设备报告的 mf 绝对值约为相同条件下其他不同设备报告的量的 2 倍。

手机校准后我做了很多测试,我什至将设备置于“飞行模式”,试图最大限度地减少来自自己设备的电磁干扰。另一种评论是,在某些设备上插入 USB 电缆可能会产生重要的磁场变化。

我在给定设备上看到的最糟糕的结果(在校准、飞行模式和 USB 断开连接之后)是这样的:使用罗盘应用程序将设备置于水平面上,我读取读数,在水平面上将手机旋转 90 度,然后采取新的指南针读数。两个读数相差超过 15 度!

幸运的是,并非所有设备都包含如此糟糕的传感器。最好的设备在旋转 90 度后会有大约 2-3 度的误差。

结论:除非您对磁场传感器非常有信心,因为您已经测试并证明了其良好的性能,否则您应该对此类传感器报告的读数给出有限的可靠性。

I just can confirm the problem.

As the author of the steady compass application, I have done many tests of magnetic field sensors with different devices. I have found that one of the devices reported an absolute value of mf about 2x the amount reported by other different device under the same conditions.

I have done a lot of test after phone calibration, and I even put the devices in "airplane mode" trying to minimize electromagnetic interferences coming from the own device. Another comment is that plugging the USB cable on some devices can create important magnetic field variations.

The worst results that I have seen on a given device (after calibration, airplane mode and USB disconnected) is this: Using a compass application with the device on horizontal plane, I take a reading, rotate phone 90 deg in the horizontal plane and take a new compass reading. Both readings differ in more than 15 degrees!

Fortunately, not all devices include such a bad sensors. Best devices have errors of about 2-3 degrees after a 90 degrees rotation.

The conclusion: Unless you are very confident on your magnetic field sensor because you have tested and certified a good behavior, you should give a limited reliability to the readings reported by such sensor.

乖不如嘢 2024-12-26 22:48:07

我也遇到过传感器的这些问题。我相信手机会根据制造商使用的硬件给出不同的传感器读数。
尝试读取传感器的准确度以了解 SENSOR_STATUS_UNRELIABLE。您可能需要重新校准磁力计。

I have also experienced these problems with the sensors. I believe the phones will give different sensor readings based on the hardware used by the manufacturer.
Try reading the accuracy of the sensor for SENSOR_STATUS_UNRELIABLE. You may have to recalibrate the magnetometer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文