title: Integrating gyro and accelerometer readings
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1586658/combine-gyroscope-and-accelerometer-data">Combine Gyroscope and Accelerometer Data</a>  </p>
  </blockquote>
  
  
  
  <p>I have read a number of papers on <code>Kalman filters</code>, but there seem to be few good publically accessible worked examples of getting from mathematical paper to actual working code.</p>
  
  <p>I have a system containing a three-axis accelerometer and a single gyro measuring rotation around one of the accelerometer axes. The system is designed to be held by a human, and much of the time the gyro will be measuring rotation about the gravity vector or close to it. (People working in the same industry will likely recognise what I am talking about from that ;)) I realise this is underconstrained.</p>
  
  <p>The gyros appear to have a near-constant bias that is slightly different for each instance of the system. How would I go about coding a filter to use the accelerometer readings to calibrate the gyro at times when the system is tilted so the gyro axis is not collinear with gravity, and is being rotated about the gyro axis? It seems like there should be enough information to do that, but being told that there isn't and why would be an answer too :)</p>