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!

 Réponse acceptée

Walter Roberson
Walter Roberson le 3 Mai 2011

1 vote

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 commentaire

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

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 3 Mai 2011

0 votes

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 commentaire

Andre
Andre le 3 Mai 2011
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.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by