我正在我的应用程序中使用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];
我该如何利用这些数据来检测运动?我需要进行哪些计算?