Question

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 "real" differences?

Thanks!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top