Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Relative Postion Calculation using Accelerometer

  1. Apr 22, 2012 #1
    I am starting to learn Mobile Phone Application Development.
    Suddenly this idea clicked in.
    The app starts with the Phone in rest on your living room table.
    Now, the phone is picked up from the living room and transported to the dining room.
    Could the app be able to tell this?
    Here is how I think it.
    If I constantly monitor the acceleration in all three axis, I could be able to tell the instanteneus velocity about those axixes. Then time integral should provide me the displacement?
    Is there flaw somewhere?
    Can the mobile phone accelerometer be fast and accurate enough?
  2. jcsd
  3. Apr 22, 2012 #2
    The acceleration vector described by the phones accelerometers will be the sum of 2 component vectors, the actual acceleration of the phone, and the force of gravity. In order to make your idea work you need a way to figure out the orientation of the phone at every instant so that you know the direction of the gravity vector (you already know the amplitude is 9.8 m/s2). Once you know the gravity component you can subtract it from the vector measured by the phone to obtain the acceleration. Then you could, in principal, integrate over time to keep track of relative displacement.

    The tricky part is finding the direction of the gravity vector. I can think of no way to do it. someone more clever then I might have an idea though.
  4. Apr 22, 2012 #3
    Theoretically, it's very possible.

    Practically, there's a problem. Accelerometers aren't perfect, which means that the larger the displacement (especially when the discplacement occurs in all directions in the three dimensions), the larger the error. Using only an accelerometer, you have no way of knowing how large this error is.
  5. Apr 22, 2012 #4
    Yeah, the rotation thing is what is bothering me too.
    Lets suppose the Phone starts flat on the table, with x-acceleration = 0, y-acceleration = 0 and z-acceleration = 9.8m/s.
    Now, if our kind volunteer would always transport the phone, with its plane parallel to the ground (like in the initial condition), then we could always subtract 9.8m/s from z-acceleration.
    But what if he rotates the phone? What acceleration is felt during the rotation? Can I distinguish rotation from translation?, and if yes, can I find the new orientation, and thus be able to correctly subtract the gravity?
  6. Apr 25, 2012 #5
    what other sensors does it have? magnetometer? gyro?
  7. Aug 1, 2012 #6
    Many phones have gyroscope sensors and some have magnetic compasses but those have decreased accuracy indoors
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook