aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/AtrackProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/AtrackProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/AtrackProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/AtrackProtocolDecoder.java b/src/org/traccar/protocol/AtrackProtocolDecoder.java
index e922f0cb8..b0b7ef1fc 100644
--- a/src/org/traccar/protocol/AtrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/AtrackProtocolDecoder.java
@@ -27,6 +27,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;
@@ -128,7 +129,7 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder {
position.set(Event.KEY_INPUT, buf.readUnsignedByte());
// Speed
- position.setSpeed(buf.readUnsignedShort() * 0.539957);
+ position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedShort()));
// Output
position.set(Event.KEY_OUTPUT, buf.readUnsignedByte());