I'm getting the phone absolute rotation (minus the z-axis) using the phone accelerometer with something like this:
motionManager.startAccelerometerUpdates()
...
if let data = motionManager.accelerometerData {
let x = data.acceleration.x
let y = data.acceleration.y
}
I know it can also be obtained using motionManager.startGyroUpdates()
as stated in this answer:
Obtain absolute rotation using CMDeviceMotion?
I'd like to know what is the differences between using the accelerometer and the gyroscope for this goal. Is it one faster, more precise, less resource hungry than the other?