diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-17 05:09:42 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-01-17 05:09:42 +1300 |
commit | 8733832c8b8cb50528e14c0f7db845384787ac61 (patch) | |
tree | 8f13f3b6c3db9452c0ec2ffd59dccd9ae8da55c1 /src/org/traccar/protocol | |
parent | 2e6d54feff3a364aa7e86b7c53beed6d3682b169 (diff) | |
download | traccar-server-8733832c8b8cb50528e14c0f7db845384787ac61.tar.gz traccar-server-8733832c8b8cb50528e14c0f7db845384787ac61.tar.bz2 traccar-server-8733832c8b8cb50528e14c0f7db845384787ac61.zip |
Use converter to decode speed
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/GalileoProtocolDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
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: |