aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-14 22:51:30 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-11-14 22:51:30 +1300
commit133a527625b9341138e2b52d566c824c36fb940f (patch)
treec1ff927326fbd7282dd78aa18221f2d0ec1c3cc9 /src/org
parent4b1b5855ea48624605574c69f5c8ae8f7b8fa54d (diff)
downloadtrackermap-server-133a527625b9341138e2b52d566c824c36fb940f.tar.gz
trackermap-server-133a527625b9341138e2b52d566c824c36fb940f.tar.bz2
trackermap-server-133a527625b9341138e2b52d566c824c36fb940f.zip
Fix Navis speed decoding
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/NavisProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java
index 077f34e8d..e06ef1b57 100644
--- a/src/org/traccar/protocol/NavisProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavisProtocolDecoder.java
@@ -22,6 +22,7 @@ import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.helper.BitUtil;
import org.traccar.helper.DateBuilder;
+import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
import java.net.SocketAddress;
@@ -144,7 +145,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
position.setLatitude(buf.readFloat() / Math.PI * 180);
position.setLongitude(buf.readFloat() / Math.PI * 180);
- position.setSpeed(buf.readFloat());
+ position.setSpeed(UnitsConverter.knotsFromKph(buf.readFloat()));
position.setCourse(buf.readUnsignedShort());
position.set(Position.KEY_ODOMETER, buf.readFloat() * 1000);