aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java4
-rw-r--r--src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java
index 5dad1458d..ff33cb103 100644
--- a/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -60,9 +60,9 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
.groupEnd()
.number("(dd)(dd)(dd),?") // date (mmddyy if comma-delimited, otherwise yyddmm)
.expression("([AV]),?") // validity
- .number(" *(d+)(dd.d+)") // latitude
+ .number(" *(d*)(dd.d+)") // latitude
.expression("([NS]),?")
- .number(" *(d+)(dd.d+)") // longitude
+ .number(" *(d*)(dd.d+)") // longitude
.expression("([EW]),?")
.number("([ d.]{1,5})(?:d*,)?") // speed
.number("(dd)(dd)(dd),?") // time (hhmmss)
diff --git a/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java
index e0dd1165b..321d0cb50 100644
--- a/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java
@@ -12,6 +12,9 @@ public class Tk103ProtocolDecoderTest extends ProtocolTest {
var decoder = new Tk103ProtocolDecoder(null);
verifyPosition(decoder, text(
+ "(868822040452227,DW3B,150421,A,4154.51607N,45.78950E,0.050,103142,0.000,595.200,7,0)"));
+
+ verifyPosition(decoder, text(
"(086375304593BR00210119A2220.0160N11335.4073E0000014000309.84001000293L0000015FP23BS27F)"));
verifyAttribute(decoder, text(