aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-02-21 23:01:02 -0800
committerAnton Tananaev <anton@traccar.org>2022-02-21 23:01:02 -0800
commit73df090369b377dc55d77c6ada92722975d8fe99 (patch)
treeb7dc6315592b5b9ad6f4e058b780d3284c23fd02 /src/main/java/org
parent23bbb48eaf69db1c858a7f027d9f7a2fba8796ea (diff)
downloadtrackermap-server-73df090369b377dc55d77c6ada92722975d8fe99.tar.gz
trackermap-server-73df090369b377dc55d77c6ada92722975d8fe99.tar.bz2
trackermap-server-73df090369b377dc55d77c6ada92722975d8fe99.zip
Fix heading decoding
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java b/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java
index 64663374d..e7ea87428 100644
--- a/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/OrbcommProtocolDecoder.java
@@ -95,7 +95,8 @@ public class OrbcommProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(UnitsConverter.knotsFromKph(Integer.parseInt(value)));
break;
case "heading":
- position.setCourse(Integer.parseInt(value) * 0.1);
+ int heading = Integer.parseInt(value);
+ position.setCourse(heading <= 360 ? heading : 0);
break;
default:
break;