diff options
-rw-r--r-- | src/org/traccar/protocol/GpsmtaProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java index 37023181e..0ee207219 100644 --- a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java +++ b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java @@ -32,7 +32,7 @@ public class GpsmtaProtocolDecoder extends BaseProtocolDecoder { } private static final Pattern PATTERN = new PatternBuilder() - .number("(d+) ") // uid + .expression("([^ ]+) ") // uid .number("(d+) ") // time .number("(d+.d+) ") // latitude .number("(d+.d+) ") // longitude diff --git a/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java b/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java index cd1257de7..8d7b6ab0f 100644 --- a/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java +++ b/test/org/traccar/protocol/GpsmtaProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class GpsmtaProtocolDecoderTest extends ProtocolDecoderTest { GpsmtaProtocolDecoder decoder = new GpsmtaProtocolDecoder(new GpsmtaProtocol()); verifyPosition(decoder, text( + "3085a94ef459 1446536867 49.81621 24.054207 1 0 22 0 10 12 24 0 0")); + + verifyPosition(decoder, text( "864528021249771 1446116686 49.85073 24.004438 0 217 6 338 00 59 27 0 0")); verifyPosition(decoder, text( |