加速度计、陀螺仪和磁力计

编程入门 行业动态 更新时间:2024-10-27 00:35:38
本文介绍了加速度计、陀螺仪和磁力计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是 Core Motion 的新手,我很困惑.有人可以解释一下这些输入是什么以及它们如何用简单的术语来衡量吗?

I'm new to Core Motion and I'm very confused. Can somebody please explain what these inputs measure and how they can be useful in simple terms?

推荐答案

加速度计 测量相对于重力的运动,依靠感觉"施加到设备的运动力.运动的力量可以描述为设备的加速和减速的速率,因此该传感器的名称.

Accelerometers measure movement relative to gravity, by virtue of "feeling" the force of movement applied to the device. Force of movement can be described as the rate of acceleration and deceleration of the device, hence the name of this sensor.

陀螺仪通过悬挂元件报告其相对于设备的旋转来测量旋转的变化.当设备旋转时,这个悬浮元素不会旋转,因此它会发出报告,告诉您手机旋转了多远.

Gyroscopes measure changes in rotation by virtue of a suspended element reporting its rotation relative to the device. As the device rotates, this suspended element doesn't rotate, so there's a report coming from it that tells you how far the phone's rotated.

磁力计从北/南磁场中获得旋转位置的概念,指南针用来了解它们相对于极点的位置.这些数据(主要)用于帮助陀螺仪,因为这些东西会受到浮动和惯性的影响.

Magnetometers get their idea of rotational position from the north/south magnetic fields that compasses use to know where they are relative to the poles. This data is used (primarily) to help the Gyroscope, because these things suffer from float and inertia.

将来自这些传感器的信息结合起来,当过滤得当(Apple 使用 CoreMotion 为您提供)后,您就可以了解手机的所有动作.

Combined, the information from these sensors, when filtered well (which Apple does for you with CoreMotion) give you all the movement of a phone.

这样您就可以知道用户是像乒乓球拍一样摆动手机,还是像 Wii Remote Mario 风格的游戏控制器一样转向,或者只是走路.

So you can know if the user is swinging the phone around like a table tennis bat, or steering like a Wii Remote Mario style game controller, or simply walking.

更多推荐

加速度计、陀螺仪和磁力计

本文发布于:2023-10-08 02:05:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471199.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:磁力计   加速度计   陀螺仪

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!