aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Xt013ProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
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