iOS陀螺仪 参数意义

self.mManager = [[CMMotionManager alloc]init];

    self.mManager.deviceMotionUpdateInterval = 0.5;

    

    if (self.mManager.gyroAvailable) {

        [self.mManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue] withHandler:^(CMDeviceMotion * _Nullable motion, NSError * _Nullable error) {

            NSLog(@"RotationRate X:%.2lf Y:%.2lf Z:%.2lf ",motion.userAcceleration.x,motion.userAcceleration.y,motion.userAcceleration.z);

        }];

    }

 

x轴 头 靠近 负数 Y参数
x轴 头 远离 正数

y轴 左侧 高 正数 X参数
y轴 右侧 高 负数

posted @ 2016-10-08 08:16  慢慢儿  阅读(829)  评论(0编辑  收藏  举报