title: How to use deviceMotion attitude values (roll,pitch and yaw) to detect a motion
body: <p>I'm using <code>coreMotion</code> in my app to detect a motion of iOS device. I know how to get the different sensor's data from <code>coreMotion</code>. I am getting roll, pitch, and yaw data as follows from the <code>deviceMotion</code>:</p>
  
  <pre><code> float pitch =  (180/M_PI)*self.manager.deviceMotion.attitude.pitch];
   float roll = (180/M_PI)*self.manager.deviceMotion.attitude.roll];
   float yaw = (180/M_PI)*self.manager.deviceMotion.attitude.yaw];
  </code></pre>
  
  <p>How can I use these data to detect a motion?  What are the calculations that I need to do for this?</p>