title: Converting angular velocities to orientation Wii Motionplus
body: <p>I'm working on the Wii Motionplus and I've extracted the raw values using WiimoteLib Library. However, when I normalize it, I get random values that don't tally with what is actually happening. </p>
  
  <p>This is how I'm normalizing: </p>
  
  <ol>
  <li><p>Calibrate the Motionplus (i.e. Find the raw value that corresponds to zero; I do this by holding it stationary for a point of time)</p></li>
  <li><p>For every subsequent raw value read, I subtract the zero value from it to get the "relative" raw value.</p></li>
  <li><p>Then, I scale this value using <a href="http://wiibrew.org/wiki/Wiimote/Extension_Controllers" rel="nofollow">http://wiibrew.org/wiki/Wiimote/Extension_Controllers</a> (checking for yaw_fast, pitch_fast etc.), where the numerical values are computed using the measure (raw value of 8192 corresponds to 595 deg/s)</p></li>
  <li><p>I sum up all these values over time (discrete integration) to get the angle of the wiimote wrt initial orientation. </p></li>
  </ol>
  
  <p>However, when I calculate this and plot it out on a graph, a step change in one of the axes is NOT being reflected in the graph. I tried using a digital compass with it to compare, but while the compass reflects the values correctly, the wii values are completely different (even the pattern is not the same)</p>
  
  <p>Can anyone tell me where I'm going wrong with the normalization? </p>
  
  <p>Thanks!</p>