草庐IT

gyroData

全部标签

iphone - Core Motion 陀螺仪 360 度值

我正在测试CoreMotion并使用陀螺仪。现在我得到了我不理解的值(value)观。我的假设是对于每个x、y和z,我会得到一个0-360之间的值,这将是一个完整的旋转,但事实并非如此。[self.motionManagerstartGyroUpdatesToQueue:[NSOperationQueuemainQueue]withHandler:^(CMGyroData*gyroData,NSError*error){NSString*x=[NSStringstringWithFormat:@"%.02f",gyroData.rotationRate.x];NSLog(@"X:%@"