aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Xt013ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-13 16:21:04 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-13 16:21:04 +1200
commitf01ebc2af707bccfd29049afad7d081c58e7f771 (patch)
treef0ccb599554be8e29c141da64df19b65969d4abb /src/org/traccar/protocol/Xt013ProtocolDecoder.java
parent84d99d15e6048eb87ad4547273c5c9e6f69488b5 (diff)
downloadtrackermap-server-f01ebc2af707bccfd29049afad7d081c58e7f771.tar.gz
trackermap-server-f01ebc2af707bccfd29049afad7d081c58e7f771.tar.bz2
trackermap-server-f01ebc2af707bccfd29049afad7d081c58e7f771.zip
Implement units conversion class
Diffstat (limited to 'src/org/traccar/protocol/Xt013ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Xt013ProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Xt013ProtocolDecoder.java b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
index 62deed0ea..37f204bb3 100644
--- a/src/org/traccar/protocol/Xt013ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
@@ -18,6 +18,7 @@ package org.traccar.protocol;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
+import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -94,7 +95,7 @@ public class Xt013ProtocolDecoder extends BaseProtocolDecoder {
// Location
position.setLatitude(Double.valueOf(parser.group(index++)));
position.setLongitude(Double.valueOf(parser.group(index++)));
- position.setSpeed(Double.valueOf(parser.group(index++)) * 0.539957);
+ position.setSpeed(UnitsConverter.knotsFromKph(Double.valueOf(parser.group(index++))));
position.setCourse(Double.valueOf(parser.group(index++)));
position.setAltitude(Double.valueOf(parser.group(index++)));
position.setValid(parser.group(index++).equals("F"));