Search code examples
androidgeolocationlocationmaps

Is it possible to use IMU of a phone in order to improve a user's walking path?


I have a service, from which I get the user's location on an interval of time (e.g. 7 seconds). The walking path is displayed on the map, but as you can see there're many invalid locations, since the GPS receiver is trying to obtain the exact current position.

Differences between actual walked path and displayed one

The blue one is the displayed walking path and the black one is the actual walked. I was thinking of using the IMU as kind of a filter in order to check whether the retrieved location is on the path, or the location provider needs more time to update it.

Is it possible doing it in this way?


Solution

  • Yes in theory its possible to improve the GPS position with an IMU, but it requires a Kalman-Filter, which is not trivial to set up correctly and get it working correctly on range of devices. There lots of resources on the internet explaining how a Kalman-Filter works and what it can be used for.

    I also recommend reading this blog post: https://blog.maddevs.io/reduce-gps-data-error-on-android-with-kalman-filter-and-accelerometer-43594faed19c . The authors pretty much wanted to achieve the same thing as you by using a Kalman-Filter. They also published a library on github for a Kalman-based location estimation.