【发布时间】:2012-02-26 22:15:29
【问题描述】:
此程序用于检测陀螺仪的值(Roll、Pitch 和 Yaw)。
我想知道 Roll、Pitch 和 Yaw 的最大值和最小值是多少。 (陀螺仪的数值)
初始化:
[[UIAccelerometer sharedAccelerometer] setUpdateInterval:0.2f];
[[UIAccelerometer sharedAccelerometer] setDelegate:self];
motionManager = [[CMMotionManager alloc] init];
motionManager.accelerometerUpdateInterval = 0.01; // 100Hz
motionManager.deviceMotionUpdateInterval = 0.01; // 100Hz
[motionManager startDeviceMotionUpdates];
motionManager.deviceMotion.attitude.roll // 最大值和最小值?
motionManager.deviceMotion.attitude.yaw // 最大值和最小值?
motionManager.deviceMotion.attitude.Pitch // 最大值和最小值?
以及如何传递给 Values -> Degree ?
谢谢
【问题讨论】:
-
您能否在您的问题上多花点功夫,并添加一两个完整的句子以使其易于理解?
-
对不起我的英语,我是法国人,问我问题,我会尽力为你解释:)