Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to calculate g-force using x, y, z values from the accelerometer in Android 1.6

Tags:

android

I can get the three x, y, and z values from the accelerometer in Android. How can I use these to calculate the g-force?

like image 696
rwe Avatar asked Jun 09 '11 11:06

rwe


People also ask

How is g-force calculated?

To convert revolutions per minute (RPM) to relative centrifugal force (RCF), or g force, use the following formula: RCF = (RPM)2 × 1.118 × 10-5 × r. Relative centrifugal force is dependent on the speed of rotation in RPM and the distance of the particles from the center of rotation.

How do you find XYZ from acceleration?

The total acceleration is best described by a vector consisting of the x, y, and z components that you have from the accelerometer. The magnitude of the acceleration is the square root of the sum of the squares of each component, i.e. sqrt( x^2+y^2+z^2).

How do you calculate g-force from accelerometer?

If the accelerometer measures acceleration in meters per second squared (the SI unit), you can convert each acceleration into a g-force measurement by dividing by 9.81 .

What does XYZ mean in accelerometer?

The accelerometer in the mobile device provides the XYZ coordinate values, which is used to measure the position and the acceleration of the device. The XYZ coordinate represents direction and position of the device at which acceleration occurred.


1 Answers

If the accelerometer measures acceleration in meters per second squared (the SI unit), you can convert each acceleration into a g-force measurement by dividing by 9.81.

If you want the g-force as an directionless measurement, you just need to apply the pythagorean theorem to the different components of the acceleration:

double g = Math.sqrt(x * x + y * y + z * z);
like image 160
Jeremy Avatar answered Nov 15 '22 12:11

Jeremy