SensorManager

Decide if your device is static or not using the accelerometer

Retrieving sensor events

Sensor transformation to world coordinate system