Fix incorrect minimum precision logic for track recording
OsmAnd 2.5 introduced an optional minimum precision for location when recording tracks. When this is used, track points are only recorded if the location accuracy at the time of sampling is within the minimum precision. Logic in the code was inverted: points with accuracy below (i.e. within) the minimum precision were rejected, and points with accuracy above the minimum precision were accepted. For example, if the minimum precision was set to 20 metres, all points with an accuracy of 20 metres or under were incorrectly rejected.
This commit is contained in:
parent
8a595efff0
commit
6cb4b0315c
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
|||
record = false;
|
||||
}
|
||||
float precision = settings.SAVE_TRACK_PRECISION.get();
|
||||
if(precision > 0 && (!location.hasAccuracy() || location.getAccuracy() < precision)) {
|
||||
if(precision > 0 && (!location.hasAccuracy() || location.getAccuracy() > precision)) {
|
||||
record = false;
|
||||
}
|
||||
float minSpeed = settings.SAVE_TRACK_MIN_SPEED.get();
|
||||
|
|
Loading…
Reference in a new issue