I have used this code to get the G-Force value. But the problem is When I keep my iPhone on table still it show 0.99 value.Can any one tell me the reason? Code is
sx = acceleration.x * kFilteringFactor + sx * (1.0 - kFilteringFactor);
sy = acceleration.y * kFilteringFactor + sy * (1.0 - kFilteringFactor);
sz = acceleration.z * kFilteringFactor + sz * (1.0 - kFilteringFactor);
float aValue = sqrt(sx*sx+sy*sy+sz*sz);
[gLabel setText:[NSString stringWithFormat:@"%.2f",aValue]];