diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-02-26 15:23:08 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-02-26 15:24:19 +1300 |
commit | d05bee19a973798554bf9b9f5563c5a8e5ba4d5e (patch) | |
tree | 05435a5b174b549a0d8ee160051b16bba6f684d3 | |
parent | b82431f69fff7ea7c602aa41d8eddc6dc1fc6e68 (diff) | |
download | trackermap-server-d05bee19a973798554bf9b9f5563c5a8e5ba4d5e.tar.gz trackermap-server-d05bee19a973798554bf9b9f5563c5a8e5ba4d5e.tar.bz2 trackermap-server-d05bee19a973798554bf9b9f5563c5a8e5ba4d5e.zip |
Flexible coordinates format for Xexun
-rw-r--r-- | src/org/traccar/protocol/XexunProtocolDecoder.java | 4 | ||||
-rw-r--r-- | test/org/traccar/protocol/XexunProtocolDecoderTest.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java index 0929ee99b..bbf4d9453 100644 --- a/src/org/traccar/protocol/XexunProtocolDecoder.java +++ b/src/org/traccar/protocol/XexunProtocolDecoder.java @@ -38,8 +38,8 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder { .expression("G[PN]RMC,") .number("(dd)(dd)(dd).(d+),") // time .expression("([AV]),") // validity - .number("(d+)(dd.d+),([NS]),") // latitude - .number("(d+)(dd.d+),([EW])?,") // longitude + .number("(d+?)?(d?d.d+),([NS]),") // latitude + .number("(d+?)?(d?d.d+),([EW])?,") // longitude .number("(d+.?d*),") // speed .number("(d+.?d*)?,") // course .number("(dd)(dd)(dd),") // date diff --git a/test/org/traccar/protocol/XexunProtocolDecoderTest.java b/test/org/traccar/protocol/XexunProtocolDecoderTest.java index d2d921916..96560fd03 100644 --- a/test/org/traccar/protocol/XexunProtocolDecoderTest.java +++ b/test/org/traccar/protocol/XexunProtocolDecoderTest.java @@ -11,7 +11,7 @@ public class XexunProtocolDecoderTest extends ProtocolTest { XexunProtocolDecoder decoder = new XexunProtocolDecoder(new XexunProtocol(), false); - verifyNothing(decoder, text( + verifyPosition(decoder, text( "GPRMC,215853.000,A,5304.9600,N,6.7907,E,1.43,80.67,250216,00,0000.0,A*47,F,,imei:351525018007873,")); verifyPosition(decoder, text( |