iPhone/iPad gyroscope

前端 未结 3 1056
不思量自难忘°
不思量自难忘° 2021-01-26 04:00

I never really understand the applications of the gyroscope on the iPhone/iPad, does it serve the similar function as the accelerometer but like an improvement to the accelerome

3条回答
  •  鱼传尺愫
    2021-01-26 04:42

    The accelerometer tells you the difference in the force being experienced by the device and the force it would experience if it were in free fall. So if the device is static, the accelerometer tells you which way up is. When it's being shaken around, you get a summation of up plus the direction of the shake. Hence the accelerometer can detect some rotation, but not around the gravity vector and only if the device is otherwise static.

    The gyroscope tells you the velocity at which the device is being rotated. So you can integrate values coming from it to keep track of orientation. That works across all axes and irrespective of device movement.

提交回复
热议问题