From 7cc49096e7ea6965a3164ff3ffd66876bc94646c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 11 Dec 2012 21:03:16 +1300 Subject: Fix Xexun protocol decoder (fix #107) --- src/org/traccar/protocol/XexunProtocolDecoder.java | 2 +- test/org/traccar/protocol/XexunProtocolDecoderTest.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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,")); } -- cgit v1.2.3