sitcomlab / simport-learning-app

Learning tool on location data privacy, that reflects to users, what conclusions can be drawn from their location histories. This is part of the SIMPORT project.
https://www.simport.net
MIT License
7 stars 6 forks source link

Trajectory visualization: Avoid straight connections between gaps #125

Closed zven closed 2 years ago

zven commented 2 years ago

At the moment, we simply connect all the points of a trajectory with a straight line, regardless if there was a gap in the recording or not. This can result in rather odd looking trajectory with straight lines over long distances that look as if the user was flying from A to B.

Since we have the information when the tracking is started stored in the database, we can avoid the issue mentioned above.

Some guiding questions:

JuanFFranco commented 2 years ago

Managed to delete the straight lines when there's a start .

Screenshot_2021-12-17-19-10-47-192_de ifgi simport learning2 Screenshot_2021-12-17-19-13-39-584_de ifgi simport learning2

JuanFFranco commented 2 years ago

Identified straight lines when there's no start point, for example when loses gps signal or flight mode.

Screenshot_2021-12-22-07-54-59-941_de ifgi simport learning2

JuanFFranco commented 2 years ago

mapBounds issue found.

mapBounds are fixed, but identified the issue when the user travels large distances. The map will show the whole trajectory, making it difficult to identify where the inferences are located within a small area.

mapBounds could be redefined depending on the last records only and not on the whole trajectory.

Screenshot_2021-12-28-10-51-47-112_de ifgi simport learning

Identifying signal loss.

Straight lines are only deleted when there's a start identified. This keeps showing straight lines when there is GPS signal loss, for example when the user uses flight mode or when going through tunnels.

Screenshot_2021-12-28-11-03-28-739_de ifgi simport learning

Literature proposes methodologies of signal loss identification depending on the logging technique used.

zven commented 2 years ago

@schrooom, @felixerdy and @jbraese What do you think? All of the solutions that @JuanFFranco has highlighted make assumptions that might not work for us. Distance logging could work but I am almost inclined to stick to the simple way of removing the straight lines between explicit stops and starts.

schrooom commented 2 years ago

@schrooom, @felixerdy and @jbraese What do you think? All of the solutions that @JuanFFranco has highlighted make assumptions that might not work for us. Distance logging could work but I am almost inclined to stick to the simple way of removing the straight lines between explicit stops and starts.

I agree with you. We could consider distance logging using a fairly high threshold, which would at least roughly cleanup the trajectory by filtering out "extreme straights" with a negligible risk of false positives. That threshold could e.g. be set to 10km – a distance were we can be fairly sure, that such a straight line does not have any real value to our system.

jbraese commented 2 years ago

@schrooom, @felixerdy and @jbraese What do you think? All of the solutions that @JuanFFranco has highlighted make assumptions that might not work for us. Distance logging could work but I am almost inclined to stick to the simple way of removing the straight lines between explicit stops and starts.

I agree with you. We could consider distance logging using a fairly high threshold, which would at least roughly cleanup the trajectory by filtering out "extreme straights" with a negligible risk of false positives. That threshold could e.g. be set to 10km – a distance were we can be fairly sure, that such a straight line does not have any real value to our system.

Agreed as well. I think some large cut-off based on distance can work. I am not sure which value I'd choose though; if the cut-off is too small, we would have many disjointed trajectories which I think would be quite disorienting, potentially more so than some large straight lines during a train journey.

JuanFFranco commented 2 years ago

I already tried applying a threshold for this, and found out that 6 km is the maximum for deleting the straight lines from the last screenshot, when certainly I was going through tunnels and on the subway, but faced the trouble that when I was on a highway, there still some gaps on the trajectory in the second screenshot.

Screenshot_1641917563 Screenshot_1641917588

But this approach also worked for the example trajectory in Nepal.

Screenshot_1641918120