2

I want to Convert accelerometer reading in x,y,z axis into acceleration in meter/second^2.I am developing a windows phone application to calculate the distance traveled by a taxi.I have already gone through some of links like

  1. My Algorithm to Calculate Position of Smartphone - GPS and Sensors
  2. Calculating distance using Linear acceleration android
  3. http://blog.contus.com/how-to-measure-acceleration-in-smartphones-using-accelerometer/
  4. Distance moved by Accelerometer
  5. iphone accelerometer speed and distance

    But I didn't get any idea about exact way to convert acclerometer reading to acceleration.I know this reading is not accurate,But for me this is fine for now because I am considering only long distances.Please see the below mentioned code to find what I am trying to achieve

    private void CalculateAcceleration(AccelerometerReading accelerometerReading)
    {
         Vector3 acceleration = accelerometerReading.Acceleration;
         double xValue=acceleration.X;
         double yValue=acceleration.Y;
         double zValue=acceleration.Z;
         double accelerationInMeterPerSecondSquare="do something";
    }
    

    or some can please suggest some methods to calculate distances travelled from accelerometer readings

    I know I am poor in english.So I apologize for that. Thanks in advance.

Community
  • 1
  • 1
aj136252
  • 21
  • 2
  • Generally, accelerometers readings in g are convertible 1 g = 9.81 m s-2. But listen to the advice in the answer to #4 above. You cannot make this work, especially for long distances the math will produce a value dominated by error. The problem is with the DC component of velocity that accumulates over time. – jdr5ca Jan 04 '15 at 07:18
  • Thanks for the reply.Actualy I know it's covertable and I read it many place.But i am not clear how to do that.I am asking whether someone help me to complete this statement(double accelerationInMeterPerSecondSquare="do something";) in my code snippet – aj136252 Jan 04 '15 at 07:31
  • 3
    Multiply. xAccel = xValue * 9.81, yAccel = yValue * 9.81, etc – jdr5ca Jan 04 '15 at 07:48
  • Thanks #jdr5ca,I will try this and I am planning to implement a better solution using gps.Thanks for the help – aj136252 Jan 04 '15 at 10:29

0 Answers0