将 3 轴磁力计读数和加速度计转换为罗盘方位 (Win 7)

发布于 2024-12-19 08:15:08 字数 375 浏览 5 评论 0原文

我一直在使用 来自 C# 的位置和传感器 API。

我可以访问我的板载 3 轴加速度计,它提供 X、Y、Z 输出,以及所谓的 3 轴磁力计,它提供“浮动”类型的单值输出,在我当前的情况下,该输出似乎在 120-160 之间变化。位置取决于方向(即,它不仅仅是计算方位)。

我看到网络上有各种文章推导了从加速度计和磁力计值的组合中提取罗盘方位的方程,以校正位置。所有解决方案都不是微不足道的,但它们还需要磁力计的 3 轴响应。我无法访问磁力计的 3 轴输出。任何比我更聪明的人都可以解释发生了什么以及我如何能够提取轴承值吗?

I've been looking at the sensors on my Samsung 700t in Windows 7 using the Location and Sensor API from C#.

I can get access to my onboard 3-axis accelerometer which gives X,Y,Z outputs and a so-called 3-axis Magnetometer which gives a single value output of type 'float' which seems to vary from 120-160 in my current location depending on orientation (i.e. it is not just calculating a bearing).

I see that there are various articles around the web that derive equations for extracting compass bearing from a combination of accelerometer and magnetometer values correcting for location. None of the solutions is trivial, but they also require 3-axes of response from the magnetometer. I don't have access to 3-axes of output from my magnetometer. Can anyone brighter than me explain what's going on and how I might be able to extract a bearing value?

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

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

发布评论

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

评论(1

貪欢 2024-12-26 08:15:08

看起来该读数是轴承读数。它只是阻尼很重,反应缓慢,并且对附近的磁场(例如扬声器)非常敏感。这就是读数不正确的原因。 API 返回了正确的结果。

It appears that the reading is a bearing reading. It's just heavily damped, slow to react and very sensitive to nearby magnetic fields such as speakers. This was the cause of the incorrect reading. The API was giving back correct results.

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