Comparing GPS trace to a standard

Hey,
Ok so iv got a whole lot of GPS traces each of which consists of two vectors - latitude and longitude. Lets say I need to compare these traces to a standard trace that represents a path over which many of the traces were collected. There is variation of a few meters in each trace which correlates to a difference of one in the fourth digit of the minutes field.
for example dd.mmmm 58.057*8* < ---- difference of 1 here between trips
does anyone have any ideas?
at the moment im running each vector through a loop that checks that the trace passes through all of 5 points(these 5 points are being used to define the route). this is not very flexible nor efficient to say the least!

 Accepted Answer

missedpoint = 0;
for K = 1:numkeypoints
if ~any( abs(tracelats - keylats(K)) < 0.00015 & ...
abs(tracelongs - keylongs(K) < 0.0015 )
missedpoint = K;
break;
end
end
It would be probably be possible to vectorize the whole thing using bxsfun(), but the space required would counter-balance the execution time.

1 Comment

Thanks!Havnt got the chance to try it out yet but ill let you know if it worked when I do.

Sign in to comment.

More Answers (1)

Walter Roberson
Walter Roberson on 3 May 2011
What format is your data in, character or numeric?
Does it matter where else the trace goes, as long as it goes through near the 5 key points in some order? Not checking the order would be faster.

1 Comment

The data is in numeric form.
It does not matter where else the trace goes as long as it passes through the 5 points in any particular order. a small amount of offset in the coordinates is expected and is allowable as it comes from variations in the gps position from multipath errors etc.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!