aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-30 05:31:21 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-08-30 13:32:29 +1200
commitcbd55752405d65132a47205748435d937610ee7a (patch)
treebaa6d517b9417501cc9d3d77651d19dd4f4bc1a0 /src/org/traccar
parente65a701cb52ec0b5a32228b4f922cdc1a0a6fd6a (diff)
downloadtraccar-server-cbd55752405d65132a47205748435d937610ee7a.tar.gz
traccar-server-cbd55752405d65132a47205748435d937610ee7a.tar.bz2
traccar-server-cbd55752405d65132a47205748435d937610ee7a.zip
Improve TK103 protocol decoder (fix #2270)
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolDecoder.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
index ac99a1440..90c80be71 100644
--- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -41,9 +41,9 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
.number("d*") // imei?
.number("(dd)(dd)(dd),?") // date
.expression("([AV]),?") // validity
- .number("(dd)(dd.d+)") // latitude
+ .number("(d+)(dd.d+)") // latitude
.expression("([NS]),?")
- .number("(ddd)(dd.d+)") // longitude
+ .number("(d+)(dd.d+)") // longitude
.expression("([EW]),?")
.number("(d+.d)(?:d*,)?") // speed
.number("(dd)(dd)(dd),?") // time
@@ -211,7 +211,6 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(parser.nextDouble());
- // Status
String status = parser.next();
if (status != null) {
position.set(Position.KEY_STATUS, status); // binary status