3

We are planning to write a software that would track a Car's GPS position, GPS signal strength, Accelerometer (X, Y, Z) and Gyroscope(X, Y, Z) for every 5 seconds or so. And send the data up to a server for post processing. The server would determine what are roads that are covered car. So this is not a real time processing. It can happen in the backend (over the night as batch process)

When the GPS signal goes down, say for 30 seconds. The post processing should guess the lat and lon using the other sensor data recorded in the same time. So I am looking for a solution to find the speed or distance covered using Accelerometer and Gyroscope sensors.

The client could be anything an Android device or a Windows ce device. The post processing server just have to solve the data that is sent in a CSV or any some other format.

I found some articles and white papers about Inertial navigation system and other algorithms. And tried to implement some of them. Or is there any other better formula like the one I found below.

vel_new = vel_old + ( acc_old + ( (acc_new - acc_old ) / 2.0 ) ) * SAMPLING_TIME;

EDIT: In addition to all the sensor data, I also have all the roads of the particular city map that I am interested in in my database stored as sqlgeography. So with the approximate position I could get, I would try to find the closest road they could have been, or turned.

Sergiu Dumitriu
  • 11,455
  • 3
  • 39
  • 62
franklins
  • 3,710
  • 6
  • 41
  • 56

2 Answers2

2

This a classic question: It won't work. That answer is about the position but it won't work even for the speed.

You would be better off with a heuristic that uses the last and the first measured velocity from the GPS and interpolates between them, enforcing position constraints deducible from a map.

Community
  • 1
  • 1
Ali
  • 56,466
  • 29
  • 168
  • 265
  • Thanks for your answers. In addition to all the sensor data, I also have all the roads of the particular city map that I am interested in in my database stored as sqlgeography. So with the approximate position I could get, I would try to find the closest road they could have been, or turned into. Do you think even this wont work? Thanks. – franklins Oct 23 '12 at 11:34
  • 1
    Yes, that is what I am trying to suggest in my answer: use the GPS velocity and position estimates, then perform the interpolation on the map. It is easier and more reliable than anything else. You can use the gyroscopes to detect turns, gyroscopes are fairly precise. – Ali Oct 23 '12 at 11:38
  • Do you think even if the GPS signal is too low, the GPS will still return an estimate position and GPS velocity? And my other question, can you point me to the right direction to find how to interpolate Gyroscope reading to determine turning direction and angle of turning? Thanks. – franklins Oct 23 '12 at 12:01
  • 1
    No, there is not much you can do if you lose the GPS signal for a long time. In your question you write 30 seconds and it is not too long: You can reasonably interpolate between the start and endpoint of a 30 second gap. As for the gyros: you can use it to track the orientation of the car (esp. to detect turns). Android and ios CoreMotion provides this in the form of the rotation matrix so there is no extra implementation work required on your part. – Ali Oct 23 '12 at 13:44
  • the video later talks about using Kalman Filter to avoid double integral problem, do you think that might be a good direction to go? – franklins Oct 24 '12 at 14:46
  • 2
    Yes. How you interpolate between the poins you got from the GPS is up to you. Kalman Filter is the standard way. If you check Oliver J. Woodman's PhD thesis, Chapter 5 Enforcing environmental constraints with particle filters, you will see that there are the so called particle filters, and it also gives you an idea how it should be implemented. Since you are going to do the thing off-line, you could as well use the smoother which gives better, more precise results than the filter. – Ali Oct 24 '12 at 14:56
0

I am also having a research on this topic. there is one paper I had read , and may be it's also benifit to you. In this paper a solution becomes to reality by using accelerometer and gyroscope which combined with gps. but I have a doubt that how to substract effect of gravity to get real acceleration? I hope you can share to me if you have some thought to this paper. paper

DarkHorse
  • 161
  • 1
  • 12