Back when the iPhone 4 and 4th Generation iPod Touch came out, I was toying around with Apple's Core Motion sensor fusion algorithms to see if I could get any interesting results for very local dead reckoning (over the range of a few inches or feet). I didn’t expect anything spectacular, given the relatively low specs of the MEMS sensors. And although Apple’s CMDeviceMotion
gravity
property uses a decent (though opaque) sensor fusion algorithm, the complementary userAcceleration
property isn’t exactly targeted at dead reckoning. Still, I thought there might be enough there to have a bit of fun.
The iPhone 4, iPhone 5, 4th Gen iPod Touch, and 5th Gen iPod Touch all apparently use the STMicroelectronics LIS331DLH accelerometer and L3G4200D gyroscope. (Actually, I haven’t seen the part number for the iTouch-5 gyro yet, so it could be different.)
Teardowns: iPhone-4, iTouch-4, iPhone-5, iTouch-5
The ST specs show that accelerometer could sample at 1000 Hz up to ±8g. And that gyroscope could sample at 800 Hz up to ±2000 dps.
But, playing with my 4th Gen iPod Touch (both iOS 5 and iOS 6), I can only crank the sampling rates up to 100 Hz. If I set CMMotionManager
deviceMotionUpdateInterval
any lower than 0.01, it automatically resets to 0.01. Same for accelerometerUpdateInterval
and gyroUpdateInterval
.
Further, the accelerometer output always seems to be capped at about ±2g.
I've seen others remark on similar bounds for the iPhone 4.
Both these bounds severely limit the local acceleration calculations I can squeeze out the device (experimenting with my 4th Generation iPod touch). I presume Apple has set these bounds low to reduce power consumption. Though I don’t know if they’re set in the hardware, or in iOS somewhere.
Has anyone played with these accelerometer and gyroscope bounds on the iPhone 5 or 5th Generation iPod Touch? (Or any iPads for that matter?) Any sampling rates higher than 100 Hz? Any accelerometer measurements outside the bounds of ±2g?