aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/TeltonikaProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index d2f77549c..d3e946f69 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -26,6 +26,7 @@ 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;
@@ -106,7 +107,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
}
if (checkBit(locationMask, 3)) {
- position.setSpeed(buf.readUnsignedByte() * 0.539957);
+ position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
}
if (checkBit(locationMask, 4)) {
@@ -144,7 +145,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
position.setValid(satellites != 0);
- position.setSpeed(buf.readUnsignedShort() * 0.539957);
+ position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedShort()));
position.set(Event.KEY_EVENT, buf.readUnsignedByte());