From 8733832c8b8cb50528e14c0f7db845384787ac61 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 17 Jan 2018 05:09:42 +1300 Subject: Use converter to decode speed --- src/org/traccar/protocol/GalileoProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/protocol/GalileoProtocolDecoder.java b/src/org/traccar/protocol/GalileoProtocolDecoder.java index 3944b37de..2e997a270 100644 --- a/src/org/traccar/protocol/GalileoProtocolDecoder.java +++ b/src/org/traccar/protocol/GalileoProtocolDecoder.java @@ -20,6 +20,7 @@ import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; +import org.traccar.helper.UnitsConverter; import org.traccar.model.Position; import java.net.SocketAddress; @@ -117,7 +118,7 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { position.setTime(new Date(buf.readUnsignedInt() * 1000)); break; case 0x33: - position.setSpeed(buf.readUnsignedShort() * 0.0539957); + position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedShort() * 0.1)); position.setCourse(buf.readUnsignedShort() * 0.1); break; case 0x34: -- cgit v1.2.3