From 24071162ec7cbae1c8a06e1e51837e9e9b2e8bdb Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 9 Feb 2015 12:38:25 +1300 Subject: Fix xt013 regex pattern (fix #1035) --- src/org/traccar/protocol/Xt013ProtocolDecoder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/org/traccar/protocol/Xt013ProtocolDecoder.java b/src/org/traccar/protocol/Xt013ProtocolDecoder.java index 85048a93f..389ed3b59 100644 --- a/src/org/traccar/protocol/Xt013ProtocolDecoder.java +++ b/src/org/traccar/protocol/Xt013ProtocolDecoder.java @@ -44,10 +44,10 @@ public class Xt013ProtocolDecoder extends BaseProtocolDecoder { "(\\d{2})(\\d{2})(\\d{2})," + // Time (HHMMSS) "([+-]\\d+\\.\\d+)," + // Latitude "([+-]\\d+\\.\\d+)," + // Longitude - "(\\d+)," + // Altitude - "(\\d+)," + // Course "(\\d+)," + // Speed + "(\\d+)," + // Course "\\d+," + + "(\\d+)," + // Altitude "([FL])," + // GPS fix "\\d+," + "(\\d+)," + // GPS level @@ -100,9 +100,9 @@ public class Xt013ProtocolDecoder extends BaseProtocolDecoder { // Location position.setLatitude(Double.valueOf(parser.group(index++))); position.setLongitude(Double.valueOf(parser.group(index++))); - position.setAltitude(Double.valueOf(parser.group(index++))); + position.setSpeed(Double.valueOf(parser.group(index++)) * 0.539957); position.setCourse(Double.valueOf(parser.group(index++))); - position.setSpeed(Double.valueOf(parser.group(index++))); + position.setAltitude(Double.valueOf(parser.group(index++))); position.setValid(parser.group(index++).equals("F")); // Other -- cgit v1.2.3