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
14
votes
4 answers

Android - How to approach fall detection algorithm

I want to be able to feature a fairly simple fall detection algorithm in my application. At the moment in onSensorChanged(), I am getting the absolute value of the current x,x,z values and subtracting SensorManager.GRAVITY_EARTH (9.8 m/s) from this.…
bobby123
  • 1,006
  • 4
  • 14
  • 24
14
votes
6 answers

What is a good way to determine significant movement with the iOS Accelerometer?

I first started thinking I could use CoreLocation to track speed in order to determine movement. This didn't work as I don't want to run the battery dry and at lower settings the speed and location readings are far from accurate. I then moved on to…
jestro
  • 2,524
  • 4
  • 27
  • 46
14
votes
3 answers

Changes in accelerometer / gyroscope limitations for iPhone 5 / 5th Gen iPod Touch?

Back when the iPhone 4 and 4th Generation iPod Touch came out, I was toying around with Apple's Core Motion sensor fusion algorithms to see if I could get any interesting results for very local dead reckoning (over the range of a few inches or…
Warren Whipple
  • 1,060
  • 2
  • 9
  • 18
14
votes
3 answers

Using the iPhone accelerometer in a car

I want to use the iPhones's accelerometer to detect motions while driving. I'm a bit confused what the accelerometer actually measures, especially when driving a curve. As you can see in the picture, a car driving a curve causes two forces. One is…
ChrisIsBack
  • 225
  • 4
  • 12
13
votes
2 answers

iOS: Movement Precision in 3D Space

From what I understand, GPS has limited accuracy. Is it possible to get a more precise location for a person in 3D space? I'm planning to write an application where users will move with their phones in any direction, but only need to move a few…
Derek
  • 747
  • 3
  • 8
  • 13
13
votes
8 answers

Tap pressure strength detection using accelerometer

Yesterday, in the presentation about the new Garageband for iPad 2, Apple demoed an interesting feature: The detection of the tap pressure by using the accelerometer. (See the drums section on the Garageband page.) I'm wondering how that's supposed…
Ortwin Gentz
  • 52,648
  • 24
  • 135
  • 213
13
votes
1 answer

Point in Tilt Direction - iPhone

In my cocos2d game, I have my player sprite and I want to have him move in the direction I tilt my iPhone. I can deal with that, the hardest bit which I can't work out is: How do I make my sprite rotate to point in the direction I am tilting? This…
Josh Kahane
  • 16,765
  • 45
  • 140
  • 253
13
votes
1 answer

Calculate location, relying on small movements, of Android phone, in Kotlin, to simulate a butterfly net

In Kotlin I am working on a program where the user moves their phone to control a virtual butterfly net. The positional information is sent to an MQTT broker and the UI application will get the data. My problem is accurately showing the position. …
James Black
  • 41,583
  • 10
  • 86
  • 166
13
votes
2 answers

Sensor.TYPE_ROTATION_VECTOR has drift: Is there an alternative?

I'm trying out Sensor.TYPE_ROTATION_VECTOR on Android. It is supposed to use magnetfieldsensor, accelerometer and gyroscope to provide accurate rotation at all times. However, I notice enormous drift occurring on Moto G 2nd. I wonder if this is a…
RobotRock
  • 4,211
  • 6
  • 46
  • 86
13
votes
2 answers

Step Counter in Android: always on?

It is a well known issue that many Android phones switch off the accelerometer when the screen goes off. However something seems to have changed with Android Fit (the app). Fit keeps counting steps even when the screen goes off. If Fit is installed,…
FabioC
  • 462
  • 5
  • 14
13
votes
4 answers

How to detect iPhone movement in space using accelerometer?

I am trying to make an application that would detect what kind of shape you made with your iPhone using accelerometer. As an example, if you draw a circle with your hand holding the iPhone, the app would be able to redraw it on the screen. This…
Thomas Desert
  • 1,346
  • 3
  • 13
  • 28
13
votes
5 answers

Calculating displacement using Accelerometer and Gyroscope (MPU6050)

I am a computer science student and working on an electronics project that requires to calculate yaw, pitch, roll and X,Y,Z displacement. I want to attach an IMU in a gun and track its orientation and displacement. I am able to get Yaw, Pitch and…
svhr
  • 260
  • 2
  • 4
  • 10
13
votes
2 answers

Getting Direction Vector in Android

How can I get a direction vector representing the direction the back of the device is pointing relative to earth coordinates? For example, if place down on a desk (screen facing up) it should read [0,0,-1] and if held vertically facing north it…
Joey
  • 10,504
  • 16
  • 39
  • 54
12
votes
2 answers

How to use Accelerometer to measure distance for Android Application Development

I am just a beginner in the application development industry. I know the accelerometer can be used to return the current acceleration along three axis in meters per second squared (m/s2). But I have come to know that an accelerometer can also be…
Dr. Arslan
  • 1,254
  • 1
  • 16
  • 27
12
votes
4 answers

What is the real world accuracy of phone accelerometers when used for positioning?

I am working on an application where I would like to track the position of a mobile user inside a building where GPS is unavailable. The user starts at a well known fixed location (accurate to within 5 centimeters), at which point the accelerometer…
Bryce Thomas
  • 10,479
  • 26
  • 77
  • 126