aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 13:59:32 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 13:59:32 +1200
commit9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea (patch)
tree029c310442cd005f43411621e3afbed5ca6e9d78 /src/org
parentb18d80471dd99381df631a9754421a3e63e21cb4 (diff)
downloadtraccar-server-9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea.tar.gz
traccar-server-9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea.tar.bz2
traccar-server-9d5ebb53b8cc2f2198c7c4f084ff3dd17ab94dea.zip
Fix Castel coordinates issue (fix #1281)
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java4
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);