views:

462

answers:

2

i have implemented following method in my application.

- (void)accelerometer:(UIAccelerometer *)acel didAccelerate:(UIAcceleration *)aceler {
if (fabsf(aceler.x) > 1.5 || fabsf(aceler.y) > 1.5 || fabsf(aceler.z) > 1.5 || fabsf(aceler.x) < -1.5 || fabsf(aceler.y) < -1.5 || fabsf(aceler.z) < -1.5 )
{
 self.navigationItem.rightBarButtonItem=nil;
 [self showImage:nil];
}

}

=> I am eager to know " The range of aceler.x ".

i.e. what would be the maximum value of aceler.x / y / z

Same way the minimum ? ( I think, it should be zero )

Thanks in advance for helping me.

+2  A: 

A quick search shows that the iPhone uses a LIS302 accelerometer. The datasheet I linked shows +-2G or +-8G. There is also a version of the LIS302 that only does +-2G. From another page I came across, mentions the output pegging out at 2.37G, so it appears they use the 2G mode or the LIS302 that only supports 2G.

Philip T.
+1  A: 

I believe the maximum value is around 2.5 g's. Thats the most I've seen, and I remember reading that somewhere else. Anything higher than that will get capped at 2.5.