tags:

views:

679

answers:

5

I'm using GPS units and mobile computers to track individual pedestrians' travels. I'd like to in real time "clean" the incoming GPS signal to improve its accuracy. Also, after the fact, not necessarily in real time, I would like to "lock" individuals' GPS fixes to positions along a road network. Have any techniques, resources, algorithms, or existing software to suggest on either front?

A few things I am already considering in terms of signal cleaning: - drop fixes for which num. of satellites = 0 - drop fixes for which speed is unnaturally high (say, 600 mph)

And in terms of "locking" to the street network (which I hear is called "map matching"): - lock to the nearest network edge based on root mean squared error - when fixes are far away from road network, highlight those points and allow user to use a GUI (OpenLayers in a Web browser, say) to drag, snap, and drop on to the road network

Thanks for your ideas!

+4  A: 

I assume you want to "clean" your data to remove erroneous spikes caused by dodgy readings. This is a basic dsp process. There are several approaches you could take to this, it depends how clever you want it to be.

At a basic level yes, you can just look for really large figures, but what is a really large figure? Yeah 600mph is fast, but not if you're in concorde. Whilst you are looking for a value which is "out of the ordinary", you are effectively hard-coding "ordinary". A better approach is to examine past data to determine what "ordinary" is, and then look for deviations. You might want to consider calculating the variance of the data over a small local window and then see if the z-score of your current data is greater than some threshold, and if so, exclude it.

Andrew Bullock
Good point, but since he is talking about pedestrian use, I think Concorde speeds are a bit excessive...
CMPalmer
Well yes, but I was simply illustrating a point. He might set his limit at 10mph, a acceptable limit for walking, but then what if someones on a bike or a skateboard? You cant make up arbitrary limits because youre bound to exclude something mistakenly. Analyse your data and looks for spikes.
Andrew Bullock
+3  A: 

In addition to Andrew's comments, you may also want to consider interference factors such as multipath, and how they are affected in your incoming GPS data stream, e.g. HDOPs in the GSA line of NMEA0183. In my own GPS controller software, I allow user specified rejection criteria against a range of QA related parameters.

I also tend to work on a moving window principle in this regard, where you can consider rejecting data that represents a spike based on surrounding data in the same window.

Shane MacLaughlin
+4  A: 

One note: you should use 3 as the minimum satellites, not 0. A GPS needs at least three sources to calculate a horizontal location. Every GPS I have used includes a status flag in the data stream; less than 3 satellites is reported as "bad" data in some way.

You should also consider "stationary" data. How will you handle the pedestrian standing still for some period of time? Perhaps waiting at a crosswalk or interacting with a street vendor?

Depending on what you plan to do with the data, you may need to supress those extra data points or average them into a single point or location.

James Schek
+4  A: 

You mention this is for pedestrian tracking, but you also mention a road network. Pedestrians can travel a lot of places where a car cannot, and, indeed, which probably are not going to be on any map you find of a "road network". Most road maps don't have things like walking paths in parks, hiking trails, and so forth. Don't assume that "off the road network" means the GPS isn't getting an accurate fix.

Adam Jaskiewicz
+2  A: 

Read the posfix to see if the signal is valid (somewhere in the $GPGGA sentence if you parse raw NMEA strings). If it's 0, ignore the message.

Besides that you could look at the combination of HDOP and the number of satellites if you really need to be sure that the signal is very accurate, but in normal situations that shouldn't be necessary.

Of course it doesn't hurt to do some sanity checks on GPS signals:

  • latitude between -90..90;
  • longitude between -180..180 (or E..W, N..S, 0..90 and 0..180 if you're reading raw NMEA strings);
  • speed between 0 and 255 (for normal cars);
  • distance to previous measurement matches (based on lat/lon) matches roughly with the indicated speed;
  • timedifference with system time not larger than x (unless the system clock cannot be trusted or relies on GPS synchronisation :-) );

To do map matching, you basically iterate through your road segments, and check which segment is the most likely for your current position, direction, speed and possibly previous gps measurements and matches. If you're not doing a realtime application, or if a delay in feedback is acceptable, you can even look into the 'future' to see which segment is the most likely.

Doing all that properly is an art by itself, and this space here is too short to go into it deeply. It's often difficult to decide with 100% confidence on which road segment somebody resides. For example, if there are 2 parallel roads that are equally close to the current position it's a matter of creative heuristics.

Wouter van Nifterick