A
A
Alexander Kunin2017-02-12 19:06:45
Algorithms
Alexander Kunin, 2017-02-12 19:06:45

How to effectively determine the convergence of trajectories taking into account time?

Hello everyone,
a rather interesting task has arisen, but I find it difficult to decide from which side to approach it.
The task is as follows - 20-50 trajectories are given (~5 min with a frequency of 5 Hz, length up to 10 km), it is necessary to find fragments of the trajectory where the approach was closer than 250 meters. Rapprochement must be considered in terms of time, that is, not just fragments that are close.
Restriction - server 1 core, 1GB RAM
Picture:
fbf94e31e38d4209b371598dec2e7dc7.png
Tell me, please, the direction in which to move? Books and articles to read are also useful information.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey Sokolov, 2017-02-12
@sergiks

Move along the time axis, count mutual distances in all combinations. For pairs where the distance turned out to be less than 250 m, write down the pair and timestamp

{
    timestamp1: [ [id1, id2], [id35,id42], ... ],
    timestamp2: [ [id1, id2], [id23,id24], ... ],
}

Then, using this data, you can again pull out the necessary coordinates and display the areas of approach.
You can optimize with additional conditions, eg. it is known that these are balloons and their speed cannot exceed a certain value. And then if some ball is removed at a considerable distance, it can not be checked for the next X seconds, for example.

K
Konstantin Stepanov, 2017-02-12
@koronabora

We need text "raw" data in the form: "point" = "user, time, coordinates" (means that at that moment such and such a user was at such coordinates)
Next - we go through the entire time interval, determining when the approach began and ended for all possible pairs, entering them as two points - the beginning and the end.
Further - we deduce results as it is convenient.

X
x67, 2017-02-13
@x67

There is nothing complicated for your server here. Everything counts very quickly. You formalize the conditions (approximately 250 meters, for example, for at least a second and 4 cycles out of 5, because noise, errors, etc.), and then run all the data. How to find the distance between two points, you probably know. Another important factor in solving the problem will be the form in which the data is presented. Are these coordinates? If so, in what coordinate system? Maybe it's speed? Then it will also be necessary to integrate them and decide on possible errors and ways to neutralize them.
In what language will you implement?

X
xmoonlight, 2017-02-13
@xmoonlight

Briefly: we find the distance in 3D space between all points at one point in time. When finding a convergence, we fix the "fracture" (trigger) and indicate in the add. in the array, a temporary notch and a bunch of objects (in pairs) located nearby at a distance of less than 250m.
Bonus (distance formula for lat/lon): Calculate distance, bearing and more between Latit...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question