aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabián Inostroza <fabianinostroza@udec.cl>2016-07-24 02:44:04 -0400
committerFabián Inostroza <fabianinostroza@udec.cl>2016-07-24 02:44:04 -0400
commitc7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30 (patch)
tree50ef35da638897b69cc661a256b3dbf15577b8ef /src
parente176392ddbea44dc94c0904f21338a11b862ad4d (diff)
downloadtraccar-server-c7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30.tar.gz
traccar-server-c7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30.tar.bz2
traccar-server-c7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30.zip
Correctly process negative latitude and longitude.
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
index fa792d7b5..41f395fd9 100644
--- a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -86,13 +86,13 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
.setTime(parser.nextInt(16), parser.nextInt(16), parser.nextInt(16));
position.setTime(dateBuilder.getDate());
- if (BitUtil.check(parser.nextInt(16), 7)) {
+ if (BitUtil.check(parser.nextInt(16), 3)) {
position.setLatitude(-parser.nextInt(16) / 600000.0);
} else {
position.setLatitude(parser.nextInt(16) / 600000.0);
}
- if (BitUtil.check(parser.nextInt(16), 7)) {
+ if (BitUtil.check(parser.nextInt(16), 3)) {
position.setLongitude(-parser.nextInt(16) / 600000.0);
} else {
position.setLongitude(parser.nextInt(16) / 600000.0);