aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config/Keys.java
diff options
context:
space:
mode:
authorsoshial <soshial@gmail.com>2021-09-10 09:22:55 +0200
committersoshial <soshial@gmail.com>2021-09-10 09:22:55 +0200
commit2a5bf04563ecc8b09f07a0007335bbd111f9c0a2 (patch)
tree0d4b074c4d73f436f89411ed4f12abac3f39fbe4 /src/main/java/org/traccar/config/Keys.java
parentf2c949998733734543be2ec795b2aa9b909b0044 (diff)
downloadtrackermap-server-2a5bf04563ecc8b09f07a0007335bbd111f9c0a2.tar.gz
trackermap-server-2a5bf04563ecc8b09f07a0007335bbd111f9c0a2.tar.bz2
trackermap-server-2a5bf04563ecc8b09f07a0007335bbd111f9c0a2.zip
add support for relative filtering
Diffstat (limited to 'src/main/java/org/traccar/config/Keys.java')
-rw-r--r--src/main/java/org/traccar/config/Keys.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java
index 6d2296fb1..f7d61a993 100644
--- a/src/main/java/org/traccar/config/Keys.java
+++ b/src/main/java/org/traccar/config/Keys.java
@@ -887,8 +887,19 @@ 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, then filter compares duplicates, distance or period only with the last received location.
+ * Server expects all locations to come sequentially.
+ *
+ * If TRUE, then filter compares duplicates, distance or period with Position's fixTime strictly before and after.
+ * Server expects locations to come at random order, since tracking device might go offline.
+ */
+ 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",
@@ -896,6 +907,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",