Using accelerometer to calculate speeds

后端 未结 2 1831
不知归路
不知归路 2020-12-09 07:00

I\'ve been doing a bit of research on a problem we are trying to solve. I think this is the best approach but please add in your opinions

We are trying to calculat

相关标签:
2条回答
  • 2020-12-09 07:22

    Interesting application.

    You are missing an important point. You either have to implement the so-called sensor fusion yourself or use the sensor fusion provided on the platform you are using. Both Android and iPhone have one.

    The TYPE_LINEAR_ACCELERATION (Android, SensorManager) or userAcceleration (iPhone) should be sufficient for you.

    As for the linked PDF, don't try integrating the acceleration, you will get very poor results. Even though that answer is about position, the velocity will already be inaccurate. I would try the GPS instead.

    0 讨论(0)
  • 2020-12-09 07:26

    I know it's very old question but since I am recently working on a similar project let me share what we did in our company. We simply used OBD-II dongle to get velocity of car. There are many API's that return information about vehicle.

    PID010D returns speed of vehicle. I'm using this PID to calculate distance between points A and B since there is no PID to return Odometer :(

    There are few libraries on github that you can find easily by search. This mine. This is not library but after run on your device you can see how it works.

    0 讨论(0)
提交回复
热议问题