Questions tagged [tilt-sensor]

31 questions
10
votes
1 answer

get tilt angle Android

I'm trying to get the tilt angle, roll angle from my sensors from my android phone but with no success so far, when I click on my button which should give me the 3 angles, I get "results: 0.0 -0.0 -0.0" package com.example; import…
Mike Bryant
  • 2,345
  • 8
  • 36
  • 58
6
votes
4 answers

How to detect left and right tilt of an android device mounted with an accelerometer?

Lets say you have the acceleration readings in all the 3 dimensions i.e X, Y and Z. How do you infer using the readings the phone was tilted left or right? The readings get generated every 20ms. I actually want the logic of inferring the tilt from…
praveen
  • 2,845
  • 2
  • 24
  • 30
5
votes
2 answers

Sensor coordinate system in Android doesn't change, does it?

I read in many places like: One Screen Deserves Another that: "The sensor coordinate system used by the API for the natural orientation of the device does not change as the device moves, and is the same as the OpenGL coordinate system." Now, I get…
polonskyg
  • 4,083
  • 9
  • 36
  • 87
4
votes
1 answer

SensorManager.getRotationMatrix gravity parameter or accelerometer parameter values in android?

In Android Documentation is specified the third parameter as float[] gravity then is specifies [0 0 g] = R * gravity (g = magnitude of gravity) Now, in most of the examples online I can see everyone sending accelerometer values to…
polonskyg
  • 4,083
  • 9
  • 36
  • 87
4
votes
1 answer

How to read Android accelerometer values in a stable and accurate way?

In a my project I am trying to control a car using data obtained through the accelerometer of an Android device. (Left, Right, Forward, Reverse). Even though I have managed to read values from the accelerometer the readings are subject to frequent…
Sachindra
  • 1,892
  • 4
  • 20
  • 28
2
votes
1 answer

Collect compass direction and camera tilt at time of photo capture

I'm trying to collect the compass direction and the tilt of the phone at the time a picture is taken. Of course, I'm not sure of an easy way to do this. My current camera implementation uses: Intent cameraIntent = new…
Rohan
  • 485
  • 8
  • 29
2
votes
0 answers

Android onSensorChanged not called on some devices

This code registers an accelerometer listener: mSensorManager = (SensorManager)ct.getSystemService(Context.SENSOR_SERVICE); mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); mSensorManager.registerListener(this,…
A.G.
  • 2,049
  • 3
  • 23
  • 36
2
votes
1 answer

how to start make app like clinometer in android

i want to get and move needle on co-ordinates as per user rotates or move device as compass does also as this app is doing already.you can see what i want to say on this link…
Manmohan Badaya
  • 2,308
  • 1
  • 19
  • 33
1
vote
3 answers

how can i perform discrete integration of gyroscope data?

gyroscopes which measure rate of rotation of angles when integrated produce angles right? my question is how do i do this? what im doing so far is just adding all the angles ive detected and that seems to be very wrong AngleIntegrated =…
user571099
  • 1,411
  • 5
  • 24
  • 41
1
vote
1 answer

Compass Heading from Magnetometer on other axis

I am building a small device that also uses magnetometer data in order to calculate the compass heading. The LSM9DS0 IMU sensor works great if the heading is calculated as a yaw (if the sensor is on a flat surface). I have 3D printed a shell in…
Tudor Popa
  • 11
  • 3
1
vote
1 answer

In Unity3D, activate phone camera when tilting phone

we are working in an Unity game for mobile. Basically it is a scene with 3D characters and a map to see where they are. I would like to know how can I activate the phone camera when I tilt vertically the phone to see the 3D characters inserted in…
1
vote
0 answers

Hanging moving gestures (Left/normal/right/up/normal/down) using mpu9150 sensor

We tried (Arduino+mpu9150) using gestures LEFT-NORMAL-RIGHT, UP-NORMAL-RIGHT. We can able to get these gestures, but not accurately. Its HANGING in middle, and sometimes values are also Incorrect. Could you please help me to fix this issue? Please…
1
vote
1 answer

FastDTW for Hand Gesture Pattern Recognition Example

I am using a tri-axis accelerometer to capture the movements of the hand. While coming through the existing solutions, I found that FastDTW is a suitable one for identifying the patterns of a time series data set. I came across the following…
1
vote
0 answers

Switching Android SensorManager speed. What's a good practice?

I'm interested to switch between different sensor orientation speeds over time to optimize the program ie.. battery life. The routine may be called very often. I'm looking for the right practice. sensorManager =…
Johnson Tey
  • 199
  • 1
  • 2
  • 8
1
vote
1 answer

Unity Rotate Foor using Input.acceleration

I am trying to rotate floor using Input.acceleration. I want to rotate floor around the point where player is standing and to limit my rotations at certain angles also stop at 0 if Input.acceleration is close to zero. considering that i'm newbie at…
1
2 3