From 82ab9abbefbf1145382fa3ee3141de7386cba30c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 31 Oct 2019 08:56:15 -0700 Subject: Use correct speed units --- src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java b/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java index 90151d061..e2f1454af 100644 --- a/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java @@ -18,6 +18,7 @@ package org.traccar.protocol; import io.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; @@ -66,7 +67,7 @@ public class StarcomProtocolDecoder extends BaseProtocolDecoder { position.setAltitude(Double.parseDouble(value)); break; case "velocity": - position.setSpeed(Integer.parseInt(value)); + position.setSpeed(UnitsConverter.knotsFromKph(Integer.parseInt(value))); break; case "heading": position.setCourse(Integer.parseInt(value)); -- cgit v1.2.3