12

I am working on an application where I would like to track the position of a mobile user inside a building where GPS is unavailable. The user starts at a well known fixed location (accurate to within 5 centimeters), at which point the accelerometer in the phone is to be activated to track any further movements with respect to that fixed location. My question is, in current generation smart phones (iphones, android phones, etc), how accurately can one expect to be able to track somebodies position based on the accelerometer these phones generally come equip with?

Specific examples would be good, such as "If I move 50 meters X from the starting point, 35 meters Y from the starting point and 5 meters Z from the starting point, I can expect my location to be approximated to within +/- 80 centimeters on most current smart phones", or whatever.

I have only a superficial understanding of techniques like Kalman filters to correct for drift, though if such techniques are relevant to my application and someone wants to describe the quality of the corrections I might get from such techniques, that would be a plus.

Bryce Thomas
  • 10,479
  • 26
  • 77
  • 126
  • 1
    I don't have data, but I can imagine that this differs very much for each model. It could even be that the way you hold the phone makes a difference. – GolezTrol May 17 '11 at 07:46
  • Not exactly the same, but combining radio tower triangulation, GPS and measuring and adjust accelerometer errors over time - you should be able to enhance position data. – Prof. Falken May 17 '11 at 08:59

4 Answers4

16

If you integrate the accelerometer values twice you get position but the error is horrible. It is useless in practice.

Here is an explanation why (Google Tech Talk) at 23:20.

I answered a similar question.

Community
  • 1
  • 1
Ali
  • 56,466
  • 29
  • 168
  • 265
  • 13
    Where did you answer this. Your answers seem to be a cyclical set of 'this is possible, but highly erroneous, see here' and round and round and round...... – thepaperboy Nov 14 '12 at 16:23
  • @user1423133 I have fixed the link. Sorry for the mix-up. This is weird that you are the first to notice it. Thanks for the warning! – Ali Nov 14 '12 at 18:23
  • 1
    If you need it for a double check in sensor fusion, it's not a horrible thing. It's relatively useless for absolute location, but to give a hint to another algorithm, it's a wonderful thing to have. Use a kalman filter – Joel Teply Oct 19 '16 at 03:02
7

I don't know if this thread is still open or even if you are still attempting this approach, but I could at least give an input into this, considering I tried the same thing.

As Ali said.... it's horrible! the smallest measurement error in accelerometers turn out to be rediculess after double integration. And due to constant increase and decrease in acceleration while walking (with each foot step in fact), this error quickly accumulates over time.

Sorry for the bad news. I also didn't want to believe it, till trying it self... filtering out unwanted measurements also doesn't work.

I have another approach possibly plausible, if you're interested in proceeding with your project. (approach which I followed for my thesis for my computer engineering degree)... through image processing!

You basically follow the theory for optical mice. Optical flow, or as called by a view, Ego-Motion. The image processing algorithms implemented in Androids NDK. Even implemented OpenCV through the NDK to simplify algorithms. You convert images to grayscale (compensating for different light entensities), then implement thresholding, image enhancement, on the images (to compensate for images getting blurred while walking), then corner detection (increase accuracy for total result estimations), then template matching which does the actual comparing between image frames and estimates actual displacement in amount of pixels.

You then go through trial and error to estimate which amount of pixels represents which distance, and multiply with that value to convert pixel displacement into actual displacement. This works up till a certain movement speed though, the real problem being camera images still getting too blurred for accurate comparisons due to walking. This can be improved by setting camera shutterspeeds, or ISO (I'm still playing around with this).

So hope this helps... otherwise google for Egomotion for real-time applications. Eventually you'll get the right stuff and figure out the jibberish I just explained to you. enjoy :)

PwC
  • 183
  • 3
  • 10
  • I had considered the possibility of image processing. What's the state of the art at the moment in terms of accuracy? I'm guessing one can't simply walk into an unfamiliar room and get reliably accurate measurements of distance traversed, at least not out of anything approaching a drop-in code library? – Bryce Thomas Oct 09 '12 at 14:35
  • 2
    I done a few tests by walking a certain distance (with a slow and steady walk speed, to cancel out video blurring effects, but to see true accuracy with pixel displacement calculations) and comparing the pixel displacement results of each test.This was on a evenly colored carpet. Results produced an average mean error of 6% within nominal result value (on Gausian curve). In otherwise, round about 94% accuracy. Previous test on tile surface produced round about 90.8% accuracy. The whole "trick in the code" is to perfect your thresholding implementation (for template matching) – PwC Oct 10 '12 at 16:09
1

The optical approach is good, but OpenCV provides a few feature transforms. You then feature match (OpenCV provides this).

Without having a second point of reference (2 cameras) you can't reconstruct where you are directly because of depth. At best you can estimate a depth per point, assume a motion, score the assumption based on a few frames and re-guess at each depth and motion till it makes sense. Which isn't that hard to code but it isn't stable, small motions of things in the scene screw it up. I tried :)

With a second camera though, it's not that hard at all. But cell phones don't have them.

Phil
  • 11
  • 1
1

Typical phone accelerometer chips resolve +/- 2g @ 12 bits providing 1024 bits over full range or 0.0643 ft/sec^2 lsb. The rate of sampling depends on clock speeds and overall configuration. Typical rates enable between one and 400 samples per second, with faster rates offering lower accuracy. Unless you mount the phone on a snail, displacement measurement likely will not work for you. You might consider using optical distance measurement instead of a phone accelerometer. Check out Panasonic device EKMB1191111.