50

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?

hippietrail
  • 13,703
  • 15
  • 87
  • 133
Moshe
  • 55,729
  • 73
  • 263
  • 420

2 Answers2

45

Actually, the accelerometer measures linear acceleration; but since force is equal to mass times acceleration, people can consider it as measuring force as well as long as it has a constant mass. Linear acceleration is the rate of change of linear velocity. A gyro on the other hand provides the angular rotational velocity measurement as oppose to the linear acceleration of movement. Both sensors measures the rate of change; they just measure the rate of change for different things.

Technically, it is possible for a linear accelerometer to measure rotational velocity. This is due to the centrifugal force the device generates when it is rotating. The centrifugal force is directly related to its rotational speed. As a matter of fact, many MEMS gyro sensors actually uses linear accelerometers to determine the rotational speed by carefully placing them in certain orientations and measuring the centrifugal forces to compute the actual rotational gyro speed.

Kelvin
  • 451
  • 4
  • 2
  • 2
    +1 for the science! So given only a 3-axis accelerometer, how does one calculate the rotational direction and the degrees rotated? – Brad Mar 24 '13 at 10:40
  • OMG! Pure physical answer. Just loved it. Thanks! :) – NightFury Jan 09 '14 at 06:08
  • Brad, you need two accelerometers spaced apart measuring in the same plane to deduce rotation. With three in the same plane you can make a two axis rate gyro using a little vector manipulation. –  Mar 17 '16 at 14:45
44

A MEMs gyroscope is a rate of change device. As the device rotates in any its axis, you can see a change in rotation. An accelerometer only provides the force along the X,Y,and Z vectors, and cannot solve for "twist". By using both sensors, you can often implement what is referred to as a 6DOF (degrees of freedom) inertial system - or dead reckoning - allowing you to find the relative physical location of the device. (Note that all inertial systems drift, so its not stable in the long term).

In short: gyroscopes measure rotation, accelerometers measure translation.

There is a new API for reading the gyroscope.

Cem Schemel
  • 305
  • 1
  • 9
Yann Ramin
  • 31,836
  • 1
  • 54
  • 80
  • 2
    The new API is nice in that there's a fairly high-level API that gets you aggregate data from all the position sensors as well as access to the raw input from both accelerometers and gyros. – Dan Ray Jun 22 '10 at 12:42