Quaternion error-state EKF for attitude sensing on iOS