title: Trying to use MadgwickAHRS python script, but can't retrieve the new calculated data
body: <p>I'm working on a project where I want to use madgwick's AHRS filter. I'm trying to use the translated Python code (Jonas Boër, 2015) but I can't get it to work properly. The script can be found here  <a href="https://github.com/morgil/madgwick_py" rel="nofollow noreferrer">https://github.com/morgil/madgwick_py</a></p>
  
  <p>I'm having trouble understanding the use of classes. Below is a script were I first import the class which is stated in madgwickahrs.py. Second I define 1 frame of random data for the gyroscope, accelerometer and magnetometer.
  After this I initialize the class and call the different functions inside the class. (note: with the normal array of data I should put this in a loop to calculate the new list of quaternions for each frame)</p>
  
  <pre><code>import numpy as np
  from madgwickahrs import MadgwickAHRS
  
  gyr = np.array( [1.6, 0.6, 1.5])
  acc = np.array( [1.2, 1.9, 1.3])
  mag = np.array( [2.1, 1.3, 2.1])
  gyr_rad = gyr * (np.pi/180)
  
  new_data = MadgwickAHRS() 
  # No parameters filled in means it will use the parameters stated 
  in the script (sampleperiod = 1/256, quaternion = [1 0 0 0], beta = 1)
  
  new_data.update(gyr_rad,acc,mag)
  new_data.update_imu(gyr_rad,acc)
  </code></pre>
  
  <p>The problem is that I don't know how to retrieve the calculated new quaternions and preferably asign it to a new variable so I can use it for the rest of the script.</p>
  
  <p>Hope I made my self clear and someone can help me!</p>
  
  <p>Thanks!</p>