Working on a tracking application using GPS. It is all fine, but sometimes because of the closed areas or bad weather I get inaccurate points. When you plot them, it just doesn’t look right, with lots of hops/jumps.
What algorithm should I run to filter out the bad signals It looks like an application of a blurring algorithm to me, but what do you think?
There are a few options:
I like to use filters – A Kalman filter is the typical (and often best) solution – it uses an amount of predictive averaging which is better than a cheap IIR (Infinite Impulse Response) filter:
FilteredValue = FilteredValue * 0.75 + NewValue * 0.25
You can get GPS modules which give you 4-5 fixes per second, which will allow you to use the above ‘cheap’ filter with reasonable response times.
You can also simply get a better GPS (SiRF III or better) that isn’t as noisy and has better indoor reception (where possible).
Consumer GPS units ‘snap to road’ where possible, so errors off the road are not seen by the consumer, as well as a few of the other techniques.
A Kalman isn’t easy to implement, but without an external dataset or sensor (such as road speed), it’s the best option. Check out http://www.google.com/search?q=open%20source%20kalman%20filter for code and tutorials on it.
-Adam