Counting the number of laps by GPS coordinates

I have a GPX file with a large set of points (longitude and latitude sorted by time), how can I calculate how many circles my set contains?

GPS is recorded during the racetrack.

A wobble is the number of times a car skips the start / end of a chain.

+3
source share
2 answers

The solution will require some trial and error in order to see what works, since it greatly depends on the quality of the data and the number of data points that you have.

, , . , , , . , , , . , , .

, : . . point in polygon, , . , . . , , , - , .

, . - , "".

+2

, , , , , . , , P (i) = (x (i), y (i)) z-.

: C = (Cx, Cy), - , , . . , C . , .

, , , P (i) P (i + 1) . , P (i) - C P (i + 1) - C, , . , .

P = (x (i) - Cx) * (y (i + 1) - Cy) + (x (i + 1) - Cx) * (y (i) - Cy)

P , , , .

theta (i, + 1) = arcsin (P/ ( (x (i) - C) * (x (i + 1) - )))

theta (i, + 1) , .

, pi/2 .

, , , , , - . , , - , 2 * pi.

, C, .

+4

Source: https://habr.com/ru/post/1788699/


All Articles