Gyroscope vs Accelerometer?

前端 未结 2 1673
盖世英雄少女心
盖世英雄少女心 2020-12-23 19:24

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?

2条回答
  •  天涯浪人
    2020-12-23 20:21

    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.

提交回复
热议问题