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.