aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-24 18:57:45 +1200
committerGitHub <noreply@github.com>2016-07-24 18:57:45 +1200
commit0c61dddb5f875e34c819f6d936fcb5e7f45d88ed (patch)
tree50ef35da638897b69cc661a256b3dbf15577b8ef /src
parente176392ddbea44dc94c0904f21338a11b862ad4d (diff)
parentc7a0fa08fde55e8d14bfee9ed5f4f14ee42c0c30 (diff)
downloadtrackermap-server-0c61dddb5f875e34c819f6d936fcb5e7f45d88ed.tar.gz
trackermap-server-0c61dddb5f875e34c819f6d936fcb5e7f45d88ed.tar.bz2
trackermap-server-0c61dddb5f875e34c819f6d936fcb5e7f45d88ed.zip
Merge pull request #2147 from FabianInostroza/master
Correctly process negative coordinates
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);