diff options
author | Abyss777 <abyss@fox5.ru> | 2017-06-16 09:30:32 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-06-16 09:30:32 +0500 |
commit | b5e180da135c48afc3d89665000b6de0e6a330e3 (patch) | |
tree | 1f9c604ac9898eb0c88a79c34b25f604037db55a /src/org/traccar/BasePipelineFactory.java | |
parent | bf57beec25228d58df8604e23d8709f6d196f3c5 (diff) | |
download | trackermap-server-b5e180da135c48afc3d89665000b6de0e6a330e3.tar.gz trackermap-server-b5e180da135c48afc3d89665000b6de0e6a330e3.tar.bz2 trackermap-server-b5e180da135c48afc3d89665000b6de0e6a330e3.zip |
Centralized motion detection
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r-- | src/org/traccar/BasePipelineFactory.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index 11457905d..45213c1a1 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -51,6 +51,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { private FilterHandler filterHandler; private CoordinatesHandler coordinatesHandler; private DistanceHandler distanceHandler; + private MotionHandler motionHandler; private GeocoderHandler geocoderHandler; private GeolocationHandler geolocationHandler; private HemisphereHandler hemisphereHandler; @@ -147,6 +148,8 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { distanceHandler = new DistanceHandler(); + motionHandler = new MotionHandler(Context.getConfig().getDouble("event.motion.speedThreshold", 0.01)); + if (Context.getConfig().hasKey("location.latitudeHemisphere") || Context.getConfig().hasKey("location.longitudeHemisphere")) { hemisphereHandler = new HemisphereHandler(); @@ -212,6 +215,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { pipeline.addLast("distance", distanceHandler); } + if (motionHandler != null) { + pipeline.addLast("motion", motionHandler); + } + if (copyAttributesHandler != null) { pipeline.addLast("copyAttributes", copyAttributesHandler); } |