aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/GlobalSatProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index 512ed9da8..17cfacbb5 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -26,6 +26,7 @@ import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.Context;
+import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -159,10 +160,10 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(Double.valueOf(value));
break;
case 'I':
- position.setSpeed(Double.valueOf(value) * 0.539957);
+ position.setSpeed(UnitsConverter.knotsFromKph(Double.valueOf(value)));
break;
case 'J':
- position.setSpeed(Double.valueOf(value) * 0.868976);
+ position.setSpeed(UnitsConverter.knotsFromMph(Double.valueOf(value)));
break;
case 'K':
position.setCourse(Double.valueOf(value));