diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-29 13:59:32 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-29 13:59:32 +1200 |
commit | 9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea (patch) | |
tree | 029c310442cd005f43411621e3afbed5ca6e9d78 /src/org/traccar/protocol/CastelProtocolDecoder.java | |
parent | b18d80471dd99381df631a9754421a3e63e21cb4 (diff) | |
download | trackermap-server-9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea.tar.gz trackermap-server-9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea.tar.bz2 trackermap-server-9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea.zip |
Fix Castel coordinates issue (fix #1281)
Diffstat (limited to 'src/org/traccar/protocol/CastelProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/CastelProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java index 8c2efb114..ea4c9dd5b 100644 --- a/src/org/traccar/protocol/CastelProtocolDecoder.java +++ b/src/org/traccar/protocol/CastelProtocolDecoder.java @@ -130,8 +130,8 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder { position.setCourse(buf.readUnsignedShort() % 360); int flags = buf.readUnsignedByte(); - position.setLatitude((flags & 0x01) == 0 ? -lat : lat); - position.setLongitude((flags & 0x02) == 0 ? -lon : lon); + position.setLatitude((flags & 0x02) == 0 ? -lat : lat); + position.setLongitude((flags & 0x01) == 0 ? -lon : lon); position.setValid((flags & 0x0C) > 0); position.set(Event.KEY_SATELLITES, flags >> 4); |