From 70b4007226fc0ebcfd5133abb2dcaab61ae929d7 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 29 Mar 2018 18:53:28 +1300 Subject: Correctly decode BCE speed value --- src/org/traccar/protocol/BceProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/BceProtocolDecoder.java b/src/org/traccar/protocol/BceProtocolDecoder.java index 22d6a5aa8..a023e60c5 100644 --- a/src/org/traccar/protocol/BceProtocolDecoder.java +++ b/src/org/traccar/protocol/BceProtocolDecoder.java @@ -21,6 +21,7 @@ import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; import org.traccar.helper.BitUtil; +import org.traccar.helper.UnitsConverter; import org.traccar.model.CellTower; import org.traccar.model.Network; import org.traccar.model.Position; @@ -93,7 +94,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder { position.setValid(true); position.setLongitude(buf.readFloat()); position.setLatitude(buf.readFloat()); - position.setSpeed(buf.readUnsignedByte()); + position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte())); int gps = buf.readUnsignedByte(); position.set(Position.KEY_SATELLITES, gps & 0xf); -- cgit v1.2.3