Saturday, 11 July 2015

latitude longitude - Detecting and fixing outliers in a GPS trajectory


I need to find an algorithm or method that can detect outlier latitude longitude points in a trajectory during post-processing, which can then be fixed (brought back into the trajectory's path based on its neighbours).


As an example of the kind of outlier points I would like to detect and fix, I've attached an image demonstrating:


Raw data in blue.


I have tried using an unscented Kalman filter to smooth out the data as best as possible, but this does not seem to work effectively enough for more extreme outliers (raw data in blue, smoothed data in red):


Raw data in blue, UKF smoothed data in red.


My UKF may not be calibrated properly (but I'm fairly certain that it is).


The trajectories are those of walkers, runners, cyclists - human-powered movement that can start and stop, but not drastically change in speed or position that quickly or suddenly.


A solution that does not rely on timing data (and only on position data) would be extremely useful (as the data being processed may not always contain timing data). However, I'm aware of how unlikely this kind of solution is to exist, so I'm equally as happy to have any solution!



Ideally, the solution would detect the outlier so that it could be fixed, resulting in a corrected trajectory:


Corrected raw data in green.




Resources I've sifted through:




Answer



As part of a tool for processing river networks I created a quality control tool to search for "spikes" in the network. Whilst I'm not suggesting you use my tool (as it is for processing river networks) I point you to the Help file which shows an image of what I had done.


I had developed code around using the law of cosines to identify successive angles between each line segment of a polyline. You could develop your own code around this idea to step along a polyline and identify extreme angles.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...