Having (x,y,t) determine if two persons were near for more than 5 minutes

31 Views Asked by At

Having a dataset/timeseries consisting of $x,y$ and time for n people I need to determine whether one person was close to another for more than m minutes.

Consider that $x,y$ are Real numbers, so if we choose a point $(x,y,t)$ we would need to "draw" a circle around that point. Any other point that it's inside the circle should be considered as one person that has been near the first person in time $t$.

In the end we have for each person points in the shape of $(x,y,t)$. So maybe there's a chance to fit those points into a $3$d shape and to calculate intersection between the different $3$d shapes.

Anyways, I'm open to different approaches to solve this. It also needs to be programmable.

1

There are 1 best solutions below

0
On

What, precisely, do you consider close? If, by close, you mean "the distance between them is less than $\epsilon$" for some given number, $\epsilon> 0$, then, for A with (x, y) position given by x= p(t), y= q(t), and B with (x, y) position given by x= u(t), y= v(t), the distance between them is $\sqrt{(p(t)- u(t))^2+ (q(t)- v(t))^2}$ so you want $\sqrt{(p(t)- u(t))^2+ (q(t)- v(t))^2}< \epsilon$. If you don't like square roots, since $\epsilon$ is positive, this is the same as $(p(t)- u(t))^2+ (q(t)- v(t))^2< \epsilon$.