diff options
author | Fabián Inostroza <fabianinostroza@udec.cl> | 2016-07-24 02:44:04 -0400 |
---|---|---|
committer | Fabián Inostroza <fabianinostroza@udec.cl> | 2016-07-24 02:44:04 -0400 |
commit | c7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30 (patch) | |
tree | 50ef35da638897b69cc661a256b3dbf15577b8ef /src | |
parent | e176392ddbea44dc94c0904f21338a11b862ad4d (diff) | |
download | trackermap-server-c7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30.tar.gz trackermap-server-c7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30.tar.bz2 trackermap-server-c7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30.zip |
Correctly process negative latitude and longitude.
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/EasyTrackProtocolDecoder.java | 4 |
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); |