Before we could analyze the data, we had to clean it a bit first. Our IMU had slight biases in the values, so in our test we had a short period of time where we kept the Frisbee flat and still. During this period, we knew that the accelerometer and gyroscope values should be zero. In our data, this was often not the case, the number would be consistently off. We subtracted this bias off from the entire data set to account for this.
Then, we lopped off the beginning and end of our data set to isolate the flight of the Frisbee.
We also applied a simple high pass filter to better remove minute oscillations from our data and reduce drift.
The diagram above shows the frames of reference of our system. The general overview is pretty simple, a fixed reference frame (G), the moving Frisbee reference frame (F), and the point that represents our IMU (p). The challenge in this system is in determining the linear acceleration of the Frisbee when your accelerometer is constantly spinning.
First we took our gyroscope data for the z direction and integrated it. We made the assumption that our Frisbee was traveling horizontally during the flight, as that's how we tried to throw it. This gave us the angle of the Frisbee frame in the ground frame at every point in time.
Next, we created a rotation matrix for every point in time using the angle that we previously calculated. This allowed us to rotate our accelerometer values so that they were in the ground frame. Since we are assuming that our Frisbee is moving horizontally, we were able to use the z acceleration directly.
By placing our IMU in the very center of our Frisbee we managed to side-step some of the more complicated math. Had it been off-center, we would have had to deal with centripetal acceleration in our accelerometer data, but in the center our 'arm length' is 0 and so there is no acceleration except those caused by linear movement.
Then, we integrated the acceleration values once to get velocity, and once again to get position, which we plotted to visualize the flight.
The source code for our analysis can be found here.