Re: CMMotionManager valid data?
Re: CMMotionManager valid data?
- Subject: Re: CMMotionManager valid data?
- From: Graham Cox <email@hidden>
- Date: Wed, 11 Jun 2014 10:35:01 +1000
Not sure if it's relevant but I've noticed that since iOS 7, motion-sensitive apps ask for a calibration almost every time, where the phone has to be rolled around until a circle completes. It never used to do that, or only in very specific cases, or when the user clicked a calibration button. That change suggests that perhaps the sensor needs calibrating a lot more often that was previously thought, and maybe your app needs to do the same before it gets reliable values.
--Graham
On 11 Jun 2014, at 10:11 am, Todd Heberlein <email@hidden> wrote:
> I’ve just started playing with CMMotionManager on my iPhone in an OpenGL program. I allocate CMMotionaManger and startDeviceMotionUpdates in -viewDidLoad. In -update I check if deviceMotionActive and print the roll value.
>
> motionManager.deviceMotion.attitude.roll
>
> For the first few times it is 0.0, but after a while a new value kicks in that seems right (e.g., 90-ish degrees or 50* or something that reflects how I am holding my phone.
>
> (1) Does CMMotionManager need a little bit of time before deviceMotion.attitude values are valid?
>
> (2) Is there a proper way to determine when deviceMotion.attitude has valid values?
>
> Thanks,
>
> Todd
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden