Search code examples
iosiphoneaccelerometerdirection

Do different iphones have the same accelerometer axes?


I was wondering if two different iPhones would have the same accelerometer axes. I know the Z axes would be pointing in the same direction because the accelerometer uses the acceleration of gravity but would the X and Y axes be pointing the same way respectively? For example if iPhone 1 accelerated east and the corresponding accelerator reading was in the X direction, would iPhone 2's acceleration North be in the Y direction? Or would it be in whatever direction the iPhone is calibrated to read?


Solution

  • The axes use the device as a reference, see this from the docs on UIAcceleration:

    iPhone accelerometer axis