aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CastelProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-07 11:28:37 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-07 11:28:37 +1200
commit1680d3d0234d9d1e2152e644882a9c1fb39a8a47 (patch)
treef86818ef84575744f98e27b470a0225150abde2c /src/org/traccar/protocol/CastelProtocolDecoder.java
parenteaa0044002aeaff0b5df11f8463a068a6ff2284d (diff)
downloadtrackermap-server-1680d3d0234d9d1e2152e644882a9c1fb39a8a47.tar.gz
trackermap-server-1680d3d0234d9d1e2152e644882a9c1fb39a8a47.tar.bz2
trackermap-server-1680d3d0234d9d1e2152e644882a9c1fb39a8a47.zip
Fix Castel frame decoder
Diffstat (limited to 'src/org/traccar/protocol/CastelProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java
index fbba960a5..c919ec936 100644
--- a/src/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/org/traccar/protocol/CastelProtocolDecoder.java
@@ -126,7 +126,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
double lat = buf.readUnsignedInt() / 3600000.0;
double lon = buf.readUnsignedInt() / 3600000.0;
position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedShort()));
- position.setCourse(buf.readUnsignedShort());
+ position.setCourse(buf.readUnsignedShort() % 360);
int flags = buf.readUnsignedByte();
position.setLatitude((flags & 0x01) == 0 ? -lat : lat);