[GIS] Detecting “lack of movement” on GPS device

gpsmovement-data

We're using a GPS tracking device mounted in vehicles and later display the movements in our application.
We're having a small issue however with vehicles when they are NOT moving.

Despite standing still, the GPS device will send information with varying positions, sometimes it'll even report the vehicle is moving (every once in a while it'll report a vehicle is moving quite fast). The end result is an ugly representation of the movement in our application, and worse, incorrect calculations with regards to how long the vehicle was moving and was standing still (we've got some statistical analysis going on as well).

I know the problem isn't new: Google Navigation on my Android phone also has trouble when I stop at a crossroad every now and again, detecting that I'm now driving in the opposite direction (when in fact, I'm standing still).

But we really need to have some method of telling the vehicle isn't moving, especially for prolonged periods of time.

The problem is compounded in some vehicles which are kept under roofs for the night, which causes the GPS to go wild due to a weaker signal (which is still strong enough to get a position however).

We can detect if the vehicle's engine is turned on or off, but we cannot assume it's not moving with the engine off (there were incidents where a damaged vehicle was towed… and of course there's a case of potential theft which also needs to be reported).

What's the best way to approach this problem?

EDIT:

To add some more information:

  • The GPS device does have an accelerometer, but that only returns a binary information (moving / not moving) and it's either TOO sensitive or just plain isn't working.

  • We do have access to things like number of satellites or quality, but we're unsure how to utilize that information. Thus my question. 🙂

  • The problem isn't about detecting if a vehicle is moving or not in real-time. We collect the data, and later on do some statistical analysis and display it. We do show the current position of the vehicle, but that is of little importance. So basically we need to be able to tell a vehicle was or wasn't moving by looking at historical data.

Best Answer

The comments below your question bring up some good points, especially about interpreting satellite data quality (# of satellites, signal strength), and you could use this information either on the mobile device or on the server to filter out "bad" GPS values. The question comes down to two parts: 1) how do you define a spurious GPS reading, and 2) how do you define a stationary state.

Let's start with a couple of parameters:

  • stationary_speed = if the mobile unit is going slower than this, then it's stationary
  • too_fast = if the mobile unit is going faster than this, then it has given a bogus GPS reading

It's tricky to calculate these speeds with accuracy. Say that you calculate the speed as the / between the previous reading (at t0) and the current reading (at t1). If the time delta is great, and the unit goes around a curve, then the actual distance traveled will be greater than the calculated distance. Also, if you get two spurious readings in a row, and they are near enough to one another, then you can get unpredictable results.

Once you have the speed, just compare it to your parameters to see if the GPS reading is spurious or if the unit is stationary.

You can do more sophisticated filtering with Kalman filters, but that can be much more involved.

Related Question