diff options
-rw-r--r-- | src/org/traccar/protocol/AtrackProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/AtrackProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/AtrackProtocolDecoder.java b/src/org/traccar/protocol/AtrackProtocolDecoder.java index ebccfec94..7755bfa25 100644 --- a/src/org/traccar/protocol/AtrackProtocolDecoder.java +++ b/src/org/traccar/protocol/AtrackProtocolDecoder.java @@ -274,7 +274,7 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder { .number("(-?d+),") // latitude .number("(d+),") // course .number("(d+),") // report id - .number("(d+.d+),") // odometer + .number("(d+.?d*),") // odometer .number("(d+),") // hdop .number("(d+),") // inputs .number("(d+),") // speed diff --git a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java index 1fe579c76..fbe94ce19 100644 --- a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java +++ b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class AtrackProtocolDecoderTest extends ProtocolTest { AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(new AtrackProtocol()); verifyPosition(decoder, buffer( + "@P,3A34,146,41431,353816057242284,20180622015809,20180622015809,20180622015809,9720689,4014230,61,2,0,20,1,0,0,0,0,2000,2000,12160,42,624,002,20009,20014,\r\n")); + + verifyPosition(decoder, buffer( "@P,1126,121,104547,358901048091554,20180412143513,20180412143514,20180413060000,16423389,48178700,108,2,6.5,9,0,0,0,0,0,2000,2000,\r\n")); verifyPosition(decoder, buffer( |