Questions tagged [accelerometer]

An accelerometer is a device that measures the proper acceleration of the device.

From Wikipedia:

An accelerometer is a device that measures proper acceleration. The proper acceleration measured by an accelerometer is not necessarily the coordinate acceleration (rate of change of velocity). Instead, the accelerometer sees the acceleration associated with the phenomenon of weight experienced by any test mass at rest in the frame of reference of the accelerometer device.

For example, an accelerometer at rest on the surface of the earth will measure an acceleration of g=9.81 m/s^2 straight upwards, due to its weight. By contrast, accelerometers in free fall or at rest in outer space will measure zero. Another term for the type of acceleration that accelerometers can measure is g-force acceleration.

Most questions regarding this tag deal with how to access, interpret, and process accelerometer data that is abundant in smartphones.

2578 questions
23
votes
4 answers

Android Low pass filter and High pass filter

I have a very basic question. What is Low Pass filter and High Pass filter in case of Android Accelerometer? When I see the output from the Accelerometer Sensor, I see If I don't use any filter, (Case : I kept my cell phone idle on table) I get z…
Jeet
  • 761
  • 3
  • 10
  • 27
23
votes
3 answers

Rotate marker as per user direction on Google Maps V2 Android

I want to rotate marker as per bearing or sensor value received from Accelerometer to show the user where actually he is moving. I have set marker icon and flat value to true but its not working as required. mCurrentLocationMarker.position(new…
Scorpion
  • 6,831
  • 16
  • 75
  • 123
22
votes
1 answer

Can we Draw line in android canvas between two points given by gyroscope?

Is it possible to draw a line from Point A(where user touched first) and Point B(where user touched second) in android over a camera. The user can touch first point and rotate his camera in other direction to tap second point. I am using…
Dropkick54
  • 283
  • 1
  • 2
  • 9
22
votes
2 answers

What is the difference between "gravity" and "acceleration" sensors in Android?

What is the difference between gravity and acceleration sensors in Android? From my point of view the physical value is the same in both cases. Which one measures the force acting on unit mass inside the device? ADDITION The question is: what…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
21
votes
4 answers

android remove gravity from accelerometer readings

I am developing an application for Android where I need to remove gravity from accelerometer readings. I have read multiple discussions on this problem, I have also found an algorithm here, but I didn't really understand it. I want to filter gravity…
Gabriel
  • 2,054
  • 4
  • 26
  • 34
21
votes
4 answers

Getting displacement from accelerometer data with Core Motion

I am developing an augmented reality application that (at the moment) wants to display a simple cube on top of a surface, and be able to move in space (both rotating and displacing) to look at the cube in all the different angles. The problem of…
eugeniodepalo
  • 801
  • 1
  • 6
  • 18
20
votes
5 answers

How to detect walking with Android accelerometer

I'm writing an application and my aim is to detect when a user is walking. I'm using a Kalman filter like this: float kFilteringFactor=0.6f; gravity[0] = (accelerometer_values[0] * kFilteringFactor) + (gravity[0] * (1.0f -…
havanakoda
  • 203
  • 1
  • 2
  • 7
20
votes
4 answers

How to do Gesture Recognition using Accelerometers

My goal is to recognize simple gestures from accelerometers mounted on a sun spot. A gesture could be as simple as rotating the device or moving the device in several different motions. The device currently only has accelerometers but we are…
smaclell
  • 4,568
  • 7
  • 41
  • 49
20
votes
2 answers

How can I get the direction of movement using an accelerometer?

I'm developing a Android application and I would like to know if is possible detect the direction of movement with one axis fixed. For example, I want put my phone on the table and detect the direction when I move it (left, right, up and down). The…
Marcos Passos
  • 400
  • 1
  • 3
  • 15
19
votes
2 answers

Using accelerometer, gyroscope and compass to calculate device's movement in 3D world

I'm working on an android application which can calculate device's movement in 6 direction. I think I can use acceleration as; "x=a.t^2" but a is not a constant. And this is the problem. How can I calculate the total movement??
kubudi
  • 658
  • 1
  • 9
  • 20
19
votes
4 answers

Is there any way to access the accelerometer from the Apple Watch?

It doesn't look like WatchKit released today has such API included.
mobileideafactory
  • 1,640
  • 1
  • 22
  • 30
19
votes
5 answers

How to determine absolute orientation

I have a xyz accelerometer and magnetometer. Now I want to determine the orientation of the device using both. The problem I see is that depending on the device orientation, I'd need to use the sensors in different order. Let me give an example. If…
Al.
  • 1,811
  • 4
  • 15
  • 8
18
votes
6 answers

Access accelerometer via Javascript in Android?

Is there any way to access accelerometer data using Javascript on Android's browser? I know it supports "onorientationchange", but I'd like to get everything. Clarification: I'm asking how to do this in a website, not a native app.
Jeff Lamb
  • 5,755
  • 4
  • 37
  • 54
18
votes
7 answers

How to remove Gravity factor from Accelerometer readings in Android 3-axis accelerometer

Can anyone help on removing the g factor from accelerometer readings? I am using SensorEventListener with onSensorChanged() method for getting Sensor.TYPE_ACCELEROMETER data. I need only pure acceleration values in all directions. So at any state if…
Pritam
  • 2,367
  • 5
  • 34
  • 50
18
votes
1 answer

Continuous accelerometer updates while in the background on iOS

I have researched this topic thoroughly before asking the question but need to ensure that I have come to the right conclusions and, if so, I would like help on implementing this as efficiently as possible. It is essential for my app to receive…
BYZZav
  • 1,418
  • 1
  • 19
  • 35