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
17
votes
2 answers

How do I detect if a device has a gyroscope in a web browser?

I am using THREE.js and creating a web-app where the user can rotate the device and the scene will move accordingly. Something similar to this. I am having a problem differentiating between devices that have a gyroscope and those that…
Parth
  • 1,114
  • 3
  • 16
  • 25
17
votes
4 answers

Detect user activity (running, cycling, driving) using Android

Using my Android device how can I detect if the user is walking, cycling or driving? I have checked the Google Fit app. It differentiates between running, cycling and driving. I am puzzled about what algorithms I should use to differentiate between…
Mayur More
  • 951
  • 2
  • 15
  • 37
17
votes
3 answers

Android Accelerometer Profiling

I have written a simple Activity which is a SensorEventListener for Sensor.TYPE_ACCELEROMETER. In my onSensorChanged(SensorEvent event) i just pick the values in X,Y,Z format and write them on to a file. Added to this X,Y,Z is a label, the label is…
shridatt
  • 896
  • 4
  • 15
  • 39
17
votes
2 answers

Read x y z coordinates of android phone using accelerometer

I am going to develop Android application which needs to read x,y,z coordinates of phone on 3D space. I would like to write a simple code and test on the device.. I am using ginger bread on both the device and emulator.
Ruwantha
  • 2,603
  • 5
  • 30
  • 44
16
votes
1 answer

Is there an equivalent to Android's Activity Recognition API in iOS?

On the last Google I/O was introduced a new service in the Location API's in Android - Activity Recognition. Is there such a framework for iOS?
Nikolay Tsenkov
  • 1,128
  • 10
  • 26
16
votes
1 answer

Obtaining orientation using gyroscope and accelerometer

I want to monitor the orientation of a device on 2 axis: very simply: which way is down. It must maintain accuracy over extended time period (12 hours) It will be subject to rotations and accelerations about all axes The device will be an Android…
Jodes
  • 14,118
  • 26
  • 97
  • 156
15
votes
4 answers

Accelerometer data: How to interpret?

I'm experimenting with a 3 accelerometer breakout board. The X and Y axis are very easy to control, but the Z axis is a bit of a mystery. I'm trying to find a way of interpreting the data in my code to increase output as the device is lifted up in…
decoderated
  • 151
  • 1
  • 1
  • 3
15
votes
3 answers

How to Calibrate Android Accelerometer & Reduce Noise, Eliminate Gravity

So, I've been struggling with this problem for some time, and haven't had any luck tapping the wisdom of the internets and related SO posts on the subject. I am writing an Android app that uses the ubiquitous Accelerometer, but I seem to be getting…
malfunction
  • 1,297
  • 2
  • 12
  • 18
15
votes
4 answers

Rotate object in Unity 3D

I can use the following code to rotate object using accelerometer. transform.rotation = Quaternion.LookRotation(Input.acceleration.normalized, Vector3.up); But i would like to rotate object like for example screen is rotating - 0, 90, 180 and 360…
Artur
  • 153
  • 1
  • 1
  • 5
15
votes
3 answers

How to use Shake API in iPhone SDK 3.0?

Apple annonced Shake API in iPhone SDK 3.0. I can not find any information regarding this new feature. Who knows about how to use it? Any example, link will be good.
sashaeve
  • 9,387
  • 10
  • 48
  • 61
14
votes
4 answers

access (faster polling) accelerometer via NativeActivity NDK

I've searched for a tutorial/an answer on polling accelerometer faster with NDK but didnt find solver yet. just found an androiddevelopers documentation here. what i need is polling acceleration about 100 samples per second (100Hz), by default my…
Azkario Rizky
  • 141
  • 1
  • 1
  • 5
14
votes
8 answers

How can I find the velocity using accelerometers only?

Using only the phone's (Android) built in accelerometer, how would I go about finding its velocity? I have been tinkering with the maths of this but whatever function I come up with tends to lead to exponential growth of the velocity. I am working…
Mark D
  • 1,309
  • 4
  • 19
  • 38
14
votes
4 answers

Orientation from Android Accelerometer

I testing the accelerometer output on 2 different devices(Elocity A7 and Archos 7 Home tablet) but the sensor seems to be giving different results. I have it programmed to set to landscape mode but the x and y axis seem to be the oppisite between…
pth
  • 141
  • 1
  • 1
  • 4
14
votes
5 answers

Transforming accelerometer's data from device's coordinates to real world coordinates

I'm really sorry if this is a very basic question, but I have not choice but ask it: How do you translate the accelerometer data from the device coordinates to real world coordinates? I mean, assuming that the accelerometer is giving me somenting…
Tommy
  • 209
  • 1
  • 2
  • 7
14
votes
5 answers

How to correlate two time series with gaps and different time bases?

I have two time series of 3D accelerometer data that have different time bases (clocks started at different times, with some very slight creep during the sampling time), as well as containing many gaps of different size (due to delays associated…
BobC
  • 3,320
  • 5
  • 24
  • 30