aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-12-27 10:21:19 -0800
committerGitHub <noreply@github.com>2021-12-27 10:21:19 -0800
commit790db6295f130e64c8346f13985dd0c15f938b40 (patch)
tree3fdb5bfc3bdb695bc29bde4105f22ac2da41e9cd /src/main/java/org/traccar/config
parent19f170b8c147935c8df4044a4fa3b6456baad6c7 (diff)
parent41453ca2ee76372a031ea206c264c1c7cde58ee6 (diff)
downloadtrackermap-server-790db6295f130e64c8346f13985dd0c15f938b40.tar.gz
trackermap-server-790db6295f130e64c8346f13985dd0c15f938b40.tar.bz2
trackermap-server-790db6295f130e64c8346f13985dd0c15f938b40.zip
Merge pull request #4740 from soshial/relative_filtering
Add support for relative filtering
Diffstat (limited to 'src/main/java/org/traccar/config')
-rw-r--r--src/main/java/org/traccar/config/Keys.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java
index 1411e8a13..e8e0ff207 100644
--- a/src/main/java/org/traccar/config/Keys.java
+++ b/src/main/java/org/traccar/config/Keys.java
@@ -893,8 +893,11 @@ public final class Keys {
Collections.singletonList(KeyType.GLOBAL));
/**
- * Filter records by Maximum Speed value in knots. Can be used to filter jumps to far locations even if they're
- * marked as valid. Shouldn't be too low. Start testing with values at about 25000.
+ * Filter records by Maximum Speed value in knots. Can be used to filter jumps to far locations even if Position
+ * appears valid or if Position `speed` field reported by the device is also within limits. Calculates speed from
+ * the distance to the previous position and the elapsed time.
+ *
+ * Tip: Shouldn't be too low. Start testing with values at about 25000.
*/
public static final ConfigKey<Integer> FILTER_MAX_SPEED = new ConfigKey<>(
"filter.maxSpeed",
@@ -908,8 +911,20 @@ public final class Keys {
Collections.singletonList(KeyType.GLOBAL));
/**
- * Time limit for the filtering in seconds. If the time difference between last position and a new one is more than
- * this limit, the new position will not be filtered out.
+ * If false, the server expects all locations to come sequentially (for each device). Filter checks for duplicates,
+ * distance, speed, or time period only against the location that was last received by server.
+ *
+ * If true, the server expects locations to come at random order (since tracking device might go offline).
+ * Filter checks for duplicates, distance, speed, or time period against the preceding Position's.
+ * Important: setting to true can cause potential performance issues.
+ */
+ public static final ConfigKey<Boolean> FILTER_RELATIVE = new ConfigKey<>(
+ "filter.relative",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
+ * Time limit for the filtering in seconds. If the time difference between the last position was received by server
+ * and a new position is received by server is more than this limit, the new position will not be filtered out.
*/
public static final ConfigKey<Long> FILTER_SKIP_LIMIT = new ConfigKey<>(
"filter.skipLimit",
@@ -917,6 +932,7 @@ public final class Keys {
/**
* Enable attributes skipping. Attribute skipping can be enabled in the config or device attributes.
+ * If position contains any attribute mentioned in "filter.skipAttributes" config key, position is not filtered out.
*/
public static final ConfigKey<Boolean> FILTER_SKIP_ATTRIBUTES_ENABLE = new ConfigKey<>(
"filter.skipAttributes.enable",