NullPointerException
NullPointerException

Reputation: 49

Calibrating the accelerometer

I am working on an application which utilizes accelerometer data to detect fall and no movement , when i set the phone on a flat surface and sampled 2000 accelerometer readings in the X and Y and Z directions (parallel to the table, gravity acting in Z direction). I then averaged these readings and used this value to calibrate the phone (subtracting this value from each subsequent reading). i got these readings

z = 8.97 
y = 0.10
x = 0.3

but when i change the orientation(for example : screen facing the ground) i got these readings

z = -10.228 
y = -0.181
x = -0.009

and same for other angles.

so my question is how can i calibrate the accelerometer to fit all possible orientation?

Upvotes: 0

Views: 106

Answers (1)

lenik
lenik

Reputation: 23498

Bad news, you cannot calibrate cheap accelerometer.

Good news, you don't need the calibration for the fall and no movement detection.

The fall is when the sum of all accelerations is below 5 (for example), and the no movement is when all accelerations stay stable for a short while.

Upvotes: 1

Related Questions