Skip to content

Conversation

@icrf2000
Copy link
Contributor

I found it would be useful to have kind of a "motion detection" to avoid polluting the track with redundant points while the user is standing still. The PR implements this in a most simple way by using Android LocationManager.requestLocationUpdates's parameter "minDistance". A new preference has been introduced to set the threshold (value in meters):

Settings -> GPS logging distance

@icrf2000 icrf2000 changed the title New preference: Minimum distance between subsequent track points Motion detection/minimum distance between subsequent track points Oct 25, 2018
@aton1698
Copy link
Contributor

Hi, I was testing this PR and I found a bug, when the GPS Logging distance input text is empty, the app crashes!
Also what happen, for example, when the distance is 3 meters, but the GPS Logging interval is set to be 1 seconds? Which has priority?

@icrf2000
Copy link
Contributor Author

icrf2000 commented Jan 15, 2019

I have fixed the issue with the empty text (didn't come into my mind that somebody would try this) by disabling the OK button if there is no number in the text entry.

For your question about the priority of interval and min_distance: The Android API docu says that both criteria must be fulfilled for a point to be logged. This conincides with my personal experience from daily use. I always habe min_distance set to 20m and interval to 4s. When I am driving by car, I get points every 4s and separated more than 20m apart because the car travels more than 20m in 4s. When I am walking, I get points every 20m and more than 4s apart because it takes me more than 4s to walk 20m.

Will try to create the PR against your develop branch.

@icrf2000 icrf2000 changed the base branch from master to develop January 15, 2019 13:50
@aton1698 aton1698 merged commit 2587f93 into labexp:develop Jan 18, 2019
@aton1698
Copy link
Contributor

Everything looks ok. Thanks for you contribuition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants