aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVitaly Litvak <vitavaque@gmail.com>2015-10-29 00:19:36 +0300
committerVitaly Litvak <vitavaque@gmail.com>2015-10-29 00:19:36 +0300
commit98162399456d9386797f7b2cce48e4d93299ad82 (patch)
treeaee5277c6eb92efa10780ab8b9faf0eab80ec892 /test
parent4610c2245dea9178ff46e7eea63b9fffd99f852d (diff)
downloadtrackermap-server-98162399456d9386797f7b2cce48e4d93299ad82.tar.gz
trackermap-server-98162399456d9386797f7b2cce48e4d93299ad82.tar.bz2
trackermap-server-98162399456d9386797f7b2cce48e4d93299ad82.zip
For #1484 - updated GlobalSat alternative decoder to support EusPro SF-400 device, fixed validity detection which was broken during refactoring
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java b/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
index 97b9f4aaa..d286b0b2f 100644
--- a/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
@@ -2,6 +2,9 @@ package org.traccar.protocol;
import org.junit.Test;
import org.traccar.ProtocolDecoderTest;
+import org.traccar.helper.PatternBuilder;
+
+import java.util.regex.Pattern;
public class GlobalSatProtocolDecoderTest extends ProtocolDecoderTest {
@@ -46,6 +49,13 @@ public class GlobalSatProtocolDecoderTest extends ProtocolDecoderTest {
verifyPosition(decoder, text(
"GSr,GTR-128,013227006963064,0080,1,a080,3,190615,163816,W07407.7134,N0440.8601,2579,0.01,130,12,0.7,11540mV,0,77,14,\"732,123,0744,2fc1,41,23\",\"732,123,0744,2dfe,05,28\",\"732,123,0744,272a,15,21\",\"732,123,0744,2f02,27,23\"*3b!"));
+ verifyPosition(decoder, text(
+ "$80050377796567,0,13,281015,173437,E08513.28616,N5232.85432,222.3,0.526,,07*37"
+ ), position("2015-10-28 17:34:37.000", true, 52.54757, 85.22144));
+
+ verifyPosition(decoder, text(
+ "$80050377796567,0,18,281015,191919,E08513.93290,N5232.42141,193.4,37.647,305.40,07*37"
+ ), position("2015-10-28 19:19:19.000", true, 52.54036, 85.23222));
}
}