Questions tagged [gyroscope]

A gyroscope is a device for measuring or maintaining orientation, based on the principles of angular momentum. Modern high-end Mobile devices have been supplying this device.Thus, many uses are found in Android API and iOS API.

A gyroscope is a device for measuring or maintaining orientation, based on the principles of angular momentum. Mechanically, a gyroscope is a spinning wheel or disk in which the axle is free to assume any orientation. Although this orientation does not remain fixed, it changes in response to an external torque much less and in a different direction than it would without the large angular momentum associated with the disk's high rate of spin and moment of inertia. Since external torque is minimized by mounting the device in gimbals, its orientation remains nearly fixed, regardless of any motion of the platform on which it is mounted.

767 questions
144
votes
4 answers

How to access accelerometer/gyroscope data from Javascript?

I have recently come across a few websites that seems to access the accelerometer or gyroscope on my laptop, detecting changes in orientation or movement. How is this done? Must I subscribe to some kind of event on the window object? On which…
Jørn Schou-Rode
  • 35,883
  • 13
  • 81
  • 120
74
votes
5 answers

Indoor Positioning System based on Gyroscope and Accelerometer

I am developing an Android App to track indoor position. My phone is an Google Nexus S using two sensors, the first being an Accelerometer and the second being a Gyroscope. My idea is that from a starting reference point (a known GPS position),…
Alexis
  • 1,539
  • 4
  • 18
  • 22
53
votes
6 answers

Detecting iOS orientation change instantly

I have a game in which the orientation of the device affects the state of the game. The user must quickly switch between Landscape, Portrait, and Reverse Landscape orientations. So far I've been registering the game for orientation notifications…
GoldenJoe
  • 7,100
  • 3
  • 45
  • 79
50
votes
2 answers

Gyroscope vs Accelerometer?

Now that iOS 4 is no longer NDA, I would like to know what Gyroscope has to offer over the Accelerometer for developers. Is there a difference in APIs? Other things?
Moshe
  • 55,729
  • 73
  • 263
  • 420
48
votes
7 answers

How can I find distance traveled with a gyroscope and accelerometer?

I want to build an app that calculates accurate Distance travelled by iPhone (not long distance) using Gyro+Accelerometer. No need for GPS here. How should I approach this problem?
Ruchir Agile
  • 497
  • 1
  • 5
  • 4
34
votes
5 answers

When to use accelerometer or gyroscope on Android

Is it ok to assume most of the user devices will have a gyroscope? In other words will I be excluding a significant number of people by using a gyroscope in my app? I'm making a children's storybook app and I'm wanting the user to be able to tilt…
user2892857
  • 395
  • 1
  • 3
  • 7
34
votes
1 answer

Gyroscope on iPhone

I need some help using gyroscope on iPhone. I can't understand readings from CMAttitude regarding pitch, roll and yaw in a particular situation. This is my code - (void)handleDeviceMotion:(CMDeviceMotion*)motion { NSLog(@"Yaw %f ",attitude.yaw…
Fab
  • 1,318
  • 1
  • 14
  • 30
30
votes
4 answers

Compensating compass lag with the gyroscope on iPhone 4

I've been experimenting with the compass and gyroscope on iPhone 4 and would like some help with an issue I'm having. I want to compensate for the slowness of the compass by using data from the gyroscope. Using CMMotionManager and its CMDeviceMotion…
donkim
  • 13,018
  • 3
  • 40
  • 47
26
votes
2 answers

Finding normal vector to iOS device

I would like to use CMAttitude to know the vector normal to the glass of the iPad/iPhone's screen (relative to the ground). As such, I would get vectors like the following: Notice that this is different from orientation, in that I don't care how…
25
votes
2 answers

Using Android gyroscope instead of accelerometer. I find lots of bits and pieces, but no complete code

The Sensor Fusion video looks great, but there's no code: http://www.youtube.com/watch?v=C7JQ7Rpwn2k&feature=player_detailpage#t=1315s Here is my code which just uses accelerometer and compass. I also use a Kalman filter on the 3 orientation values,…
HappyEngineer
  • 3,819
  • 8
  • 42
  • 58
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
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
2 answers

How to create a new CMAttitude Reference Frame to make the gravity be on the Y axis

I want to be able to change the Device Motion Manager Reference frame (for the gyro) so that I have my gravity vector on the Y axis. Usually when you start Device Motion Manager Updates you will only have the z axis of the phone aligned with…
Pochi
  • 13,198
  • 2
  • 58
  • 99
16
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
  • 938
  • 2
  • 13
  • 23
15
votes
2 answers

iPhone gyroscope - why is YAW and PITCH connected?

I have a very simple application where I am trying to use the gyroscope thru core motion. At this point, for test purposes, I am just grabbing the values of roll, pitch and yaw and printing on screen. According to the picture below and as far as I…
Roger
  • 243
  • 2
  • 4
  • 14
1
2 3
51 52