diff options
author | Anton Tananaev <anton@traccar.org> | 2024-03-01 07:29:12 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-03-01 07:29:12 -0800 |
commit | 16909b99647f969f4b9c2d3e34a7ada6fc220b94 (patch) | |
tree | d02f63abcb62b8411fe8c745a9c488fa18fa4211 /src | |
parent | 6566236b1e769ef3413a1b03bfa6665a54d63371 (diff) | |
download | trackermap-server-16909b99647f969f4b9c2d3e34a7ada6fc220b94.tar.gz trackermap-server-16909b99647f969f4b9c2d3e34a7ada6fc220b94.tar.bz2 trackermap-server-16909b99647f969f4b9c2d3e34a7ada6fc220b94.zip |
Fix Mictrack 710 decoding
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java | 5 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java index 4b11cbc74..6be3d2dc3 100644 --- a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java @@ -57,11 +57,14 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder { .text("#") .number("(?:(dd|dddd)|x*)") // cell or voltage .groupBegin() - .number("#(d+),") // mcc + .text("#") + .groupBegin() + .number("(d+),") // mcc .number("(d+),") // mnc .number("(x+),") // lac .number("(x+)") // cell id .groupEnd("?") + .groupEnd("?") .text("$GPRMC,") .number("(?:(dd)(dd)(dd).d+)?,") // time (hhmmss.sss) .expression("([AVL]),") // validity diff --git a/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java index 8a7ba84ab..085d6fc5b 100644 --- a/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java @@ -12,8 +12,8 @@ public class Tlt2hProtocolDecoderTest extends ProtocolTest { var decoder = inject(new Tlt2hProtocolDecoder(null)); verifyPositions(decoder, false, text( - "#868105044690301#MT600+#0000#0#0#129#40#0#AUTOLOW#1\r\n" + - "#072030fa20c$GPRMC,,V,,,,,,,,,,A*5C\r\n")); + "#862255061752835#MT710#0000#AUTO#1\r\n" + + "#4106#$GPRMC,151410.00,A,3010.4103,N,08146.2728,W,,214.90,010324,,,A*58\r\n")); verifyPositions(decoder, text( "#868105044690301#MT600+#0000#0#0#143#40#0#AUTO#1\r\n", |