title: Implementing Madgwick IMU algorithm
body: <p>I'm trying to use Sebastian Madgwick's IMU <a href="http://www.x-io.co.uk/open-source-imu-and-ahrs-algorithms/" rel="noreferrer">algorithms</a> to obtain roll, pitch and yaw from my sensor, which is an MPU-9150. The folder I downloaded came with some sample data, and I just replaced this data with my own, making sure to keep units/conventions the same etc. The problem is that the output angles from the algorithm with my data do not make much sense and are very noisy, especially the yaw angle. The roll and pitch seem plausible but I can get better just from my accelerometer/gyroscope data. I've attached a plot of his example data (which works), my data, and my output. </p>
  
  <p>Is there some extra filtering I have to do with my data before I try and use these algorithms? So far I've just been playing around with median filtering, and that didn't seem to make a difference. </p>
  
  <p>Thanks</p>
  
  <p><img src="https://i.stack.imgur.com/KD04c.jpg" alt="Example data">
  <img src="https://i.stack.imgur.com/Se6Gx.jpg" alt="Example data output">
  <img src="https://i.stack.imgur.com/baLun.jpg" alt="My data">
  <img src="https://i.stack.imgur.com/MPf9p.jpg" alt="My data output"></p>