That’s what I had in mind when I previously wrote about head tracking with an Android device.
This contraption is a smaller part of the whole system (which consists mainly of software). The communication between host machine and the phone is already working. The main application running on the host is receiving sensor data from the phone’s accelerometer, magnetometer and gyroscope. The refinement of the sensor data is happening on the phone itself. That’s what I’m actually working on at the moment. The information is still quite inacurate and I’m trying to improve it with a complementary filter.
When it’s done and working, I’ll write some details about it.