- Home /
Obtaining and Filtering Gyroscope/Accelerometer Data
As explained here: http://www.pieter-jan.com/node/11
The Gyroscope data that I'm getting from an iPhone in Unity 5 tends to drift over time after even about a minute it drifts from its original position in Unity in relation to its original physical position.
Is there some Unity C# code that implements a Complementary filter that does a gyroscope/accelerometer fusion? The C code in the link also looks like it only does roll/pitch and I need the yaw too.
Basically I want to put my iPhone on an armband and have it TCP/IP over WiFi to my PC to use as an armband controller for the PC much like a poor man's MYO armband.
If that works, then I want to figure out ALSO how to do this with an Arduino and Gyro/Acc setup to PC via Bluetooth. I'll tackle one thing at a time though, I'd like to figure out both solutions just for the sake of learning. :P
Answer by GuardianArchangelJohn · Apr 22, 2015 at 04:24 PM
I managed to find a white paper from TI about integrating a direction cosine matrix (I'm not sure of all the math behind it) to implement a nine axis fusion of gyroscope/accelerometer/magnetometer to get more accurate results.
http://www.ti.com/lit/an/slaa518a/slaa518a.pdf
Not sure if the magnetometer on iPhone is 3 axis or just yaw? I'd have to check.
Would really be nice to get such a thing implemented in Unity, although if I can communicate with Unity over Bluetooth like I can with my MYO, it might just be better to implement a hardware solution.
Your answer
Follow this Question
Related Questions
Sensor Fusion - Angular Velocity 0 Answers
Racket gesture using the accelerometer/gyroscope on iPhone 0 Answers
Sensor fusion script for ios? 0 Answers