aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-12-11 21:03:16 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2012-12-11 21:03:16 +1300
commit7cc49096e7ea6965a3164ff3ffd66876bc94646c (patch)
treed58c9ab2903bb9169283d3dc967aa8692319169b
parent77841ad1ad5f50c41437361a9c3b885935478a4f (diff)
downloadtrackermap-server-7cc49096e7ea6965a3164ff3ffd66876bc94646c.tar.gz
trackermap-server-7cc49096e7ea6965a3164ff3ffd66876bc94646c.tar.bz2
trackermap-server-7cc49096e7ea6965a3164ff3ffd66876bc94646c.zip
Fix Xexun protocol decoder (fix #107)
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/XexunProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 2da1c68ac..6610730e9 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -48,7 +48,7 @@ public class XexunProtocolDecoder extends GenericProtocolDecoder {
"([AV])," + // Validity
"([\\d]{2})([\\d]{2}.[\\d]{4})," + // Latitude (DDMM.MMMM)
"([NS])," +
- "([\\d]{3})([\\d]{2}.[\\d]{4})," + // Longitude (DDDMM.MMMM)
+ "([\\d]{2,3})([\\d]{2}.[\\d]{4})," + // Longitude (DDDMM.MMMM)
"([EW])," +
"([\\d]+.[\\d]+)," + // Speed
"([\\d]+.[\\d]+)?," + // Course
diff --git a/test/org/traccar/protocol/XexunProtocolDecoderTest.java b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
index 2d12110a2..832f4ee63 100644
--- a/test/org/traccar/protocol/XexunProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
@@ -21,6 +21,9 @@ public class XexunProtocolDecoderTest {
assertNotNull(decoder.decode(null, null,
"GPRMC,080303.000,A,5546.7313,N,03738.6005,E,0.56,160.13,100311,,,A*6A,L,imei:354778030461167,"));
+
+ assertNotNull(decoder.decode(null, null,
+ "GPRMC,014623.000,A,4710.8260,N,1948.1220,E,0.11,105.40,111212,00,0000.0,A*49,F,,imei:357713002048962,"));
}