Doing Science: Smartphone motion sensing

Posted by mazimadu on April 18, 2016, 8:14 p.m.

For the past few weeks I have been researching smartphone sensors for a robotics/Augmented reality project I have been working on for my masters degree. I choose to build one from scratch using my Galaxy S5's sensor and C++. This project is not yet complete since my ultimate aim is to determine distance and position from the device. But I have made some significant progress and am able to show what I have so far.

On a side note, getting device orientation (where it is facing) is not as straight forward as just using the gyroscope. In fact, you have to use the accelerometer (motion), gyroscope (angular momentum) and magenetometer (compass) to get any decent results. Even after doing that, these sensors are not accurate and need to filtered and used to correct each other.

After some tweaking I managed to implement my own version of this that provides very accurate reading of its heading relative to the ground. I then was able to stream my readings to my PC to be sure that they work. The data received is generic text data so it can be used in any game or program. The one I used was Processing (processing.org).

Check out my results below. I still need to work on it and implement a position sensing algorithm I am writing. Till then you can post in the comments ideas on how we can play with these readings.

Comments

mazimadu 8 years ago

I haven't seen this. Or at least don't remember. I see the servo is jerking a lot when still. Obviously you need a Low-Pass filter for that.