Menu

Indoor Positioning: Recreating a Smartphone’s 3D Path

We tried to figure out if it’s possible to reconstruct a smartphone’s three-dimensional path using only accelerometer and gyroscope data. This could be used for instance to draw a race track in a room by walking around, while waving your phone as a brush to draw the track.

This is definitely not an easy task. To obtain the right information, the following needs to be done:

  1. Combining the information from the accelerometer (measuring accelerations, including gravity) and the gyroscope (measuring the 3D rotation of the device) to obtain the device’s acceleration without gravity. This is the basic information required to start the reconstruction of the device’s path.
  2. The resulting data is quite noisy; even if the phone is lying still on the table, small accelerations are recorded. I evened this out a bit by using the average of the last few samples.
  3. To determine the device’s position, we have to integrate the acceleration data to obtain the device’s velocity, and then integrate that again to obtain its position. However, these integrations dramatically enlarge any small error in the data, rendering it unusable.

A good overview of this can be seen in this video:

So it turns out that creating a correct 3D path of a smartphone using only accelerometer and gyroscope data is impossible.

Based on the application in which you’d want to use this, you may be able to come up with a way to make it work though – although some form of drift will probably always exist.

Some clues:

  • If your path is limited to straight movement and 90 degree angles, you could specifically look for accelerations in specific directions
  • It may be possible to use the GPS position of the device to correct the errors to some degree.
  • You could try using a Kalman filter to predict current position based on previous values.

2 thoughts on “Indoor Positioning: Recreating a Smartphone’s 3D Path”

  1. Some additional interesting information can be found in the following answer on Stackoverflow:
    http://stackoverflow.com/questions/7829097/android-accelerometer-accuracy-inertial-navigation/7835988#7835988

  2. Bernard says:

    Fast forward to 2016, we had an other intern pursue the holy grail of indoor positioning with just a phone, but this time using optical tracking using markers. Read the article here.

Leave a comment

Your email address will not be published. Required fields are marked *