aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-31 18:32:50 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-31 18:32:50 +1200
commit743ed6cd39d661aba7d9b6671feda5c08949be6f (patch)
tree515b7fdd59ec6300fa11fb7bd7601fb797d40806 /src/org
parentc244a6c040ef8af247b08cb5ff25dfaac50aa1e5 (diff)
downloadtraccar-server-743ed6cd39d661aba7d9b6671feda5c08949be6f.tar.gz
traccar-server-743ed6cd39d661aba7d9b6671feda5c08949be6f.tar.bz2
traccar-server-743ed6cd39d661aba7d9b6671feda5c08949be6f.zip
Fix EasyTrack decoder
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocolDecoder.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
index 2ad4520a4..d6a14fd08 100644
--- a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -33,6 +33,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
super(serverManager);
}
+ //ET,358155100003016,HB,A,0d081e,07381e,8038ee09,03d2e9be,004f,0000,40c00000,0f,100,0000,00037c,29
static private Pattern pattern = Pattern.compile(
"\\*..," + // Manufacturer
"(\\d+)," + // IMEI
@@ -51,7 +52,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
"(\\p{XDigit}{4})," + // Speed
"(\\p{XDigit}{4})," + // Course
"(\\p{XDigit}{8})," + // Status
- "(\\d+)," + // Signal
+ "(\\p{XDigit}+)," + // Signal
"(\\d+)," + // Power
"(\\p{XDigit}{4})," + // Oil
"(\\p{XDigit}+),?" + // Milage
@@ -112,8 +113,8 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(
hemisphere * Integer.parseInt(parser.group(index++), 16) / 600000.0);
- position.setSpeed(Integer.parseInt(parser.group(index++), 16) / 600000.0);
- position.setCourse(Integer.parseInt(parser.group(index++), 16) / 600000.0);
+ position.setSpeed(Integer.parseInt(parser.group(index++), 16) / 100.0);
+ position.setCourse(Integer.parseInt(parser.group(index++), 16) / 100.0);
// Status
extendedInfo.set("status", parser.group(index++));