diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-10-31 08:56:15 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-10-31 08:56:15 -0700 |
commit | 82ab9abbefbf1145382fa3ee3141de7386cba30c (patch) | |
tree | 67365c47e0d5c0e019336130b7b5e80f134ae7c4 /src/main/java/org | |
parent | 7103c6b2f47a5f9281737ca8fc525de644c2aec9 (diff) | |
download | traccar-server-82ab9abbefbf1145382fa3ee3141de7386cba30c.tar.gz traccar-server-82ab9abbefbf1145382fa3ee3141de7386cba30c.tar.bz2 traccar-server-82ab9abbefbf1145382fa3ee3141de7386cba30c.zip |
Use correct speed units
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/StarcomProtocolDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
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)); |