【发布时间】:2013-05-17 06:30:17
【问题描述】:
我在我的应用程序中使用 coreMotion 来检测 iOS 设备的运动。我知道如何从coreMotion 获取不同传感器的数据。我从deviceMotion 获得如下滚动、俯仰和偏航数据:
float pitch = (180/M_PI)*self.manager.deviceMotion.attitude.pitch];
float roll = (180/M_PI)*self.manager.deviceMotion.attitude.roll];
float yaw = (180/M_PI)*self.manager.deviceMotion.attitude.yaw];
如何使用这些数据来检测运动?为此我需要进行哪些计算?
【问题讨论】:
-
先生,您想用这些值做什么?如果您试图在设备移动时监控这些值,则可以将它们显示为标签。
标签: ios core-motion