开发者

What is the difference between "UIAccelerometer" and "CLLocationManager"?

What is the difference between "UIAccelerometer" and "CLLocationManager"? Both give me x, y and z axis as result.

UIAccelerometer

  • X -18.000
  • Y -03.500
  • Z -41.000

CLLocationManager

  • X -0.036
  • Y -0.002
  • Z -1.069

Is this information from the same sensors with different formatting? Or are there 开发者_StackOverflow中文版"real" differences?

Thanks!


UIAccelerometer tells you which way — and how hard — gravity is pulling (including acceleration due to motion, which, per Einstein's general theory of relativity, is indistinguishable from gravity).

CLLocationManager tells you where you are on the surface of the earth. It's the GPS API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜