aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/XirgoProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/XirgoProtocolDecoder.java b/src/org/traccar/protocol/XirgoProtocolDecoder.java
index 38c21f387..6d215e672 100644
--- a/src/org/traccar/protocol/XirgoProtocolDecoder.java
+++ b/src/org/traccar/protocol/XirgoProtocolDecoder.java
@@ -228,7 +228,11 @@ public class XirgoProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(UnitsConverter.knotsFromKph(Double.parseDouble(values[i])));
break;
case "HD":
- position.setCourse(Integer.parseInt(values[i]) * 0.1);
+ if (values[i].contains(".")) {
+ position.setCourse(Double.parseDouble(values[i]));
+ } else {
+ position.setCourse(Integer.parseInt(values[i]) * 0.1);
+ }
break;
case "SV":
position.set(Position.KEY_SATELLITES, Integer.parseInt(values[i]));