aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/AuruProtocol.java1
-rw-r--r--src/org/traccar/protocol/AuruProtocolDecoder.java1
-rw-r--r--src/org/traccar/protocol/DishaProtocol.java1
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java8
-rw-r--r--src/org/traccar/protocol/ThinkRaceProtocolDecoder.java5
5 files changed, 7 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/AuruProtocol.java b/src/org/traccar/protocol/AuruProtocol.java
index 2a94b642a..be312383d 100644
--- a/src/org/traccar/protocol/AuruProtocol.java
+++ b/src/org/traccar/protocol/AuruProtocol.java
@@ -20,7 +20,6 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder;
import org.jboss.netty.handler.codec.string.StringDecoder;
import org.traccar.BaseProtocol;
-import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.TrackerServer;
import java.util.List;
diff --git a/src/org/traccar/protocol/AuruProtocolDecoder.java b/src/org/traccar/protocol/AuruProtocolDecoder.java
index 7421c4f06..89aa91d0b 100644
--- a/src/org/traccar/protocol/AuruProtocolDecoder.java
+++ b/src/org/traccar/protocol/AuruProtocolDecoder.java
@@ -17,7 +17,6 @@ package org.traccar.protocol;
import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.helper.BitUtil;
import org.traccar.helper.DateBuilder;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
diff --git a/src/org/traccar/protocol/DishaProtocol.java b/src/org/traccar/protocol/DishaProtocol.java
index 18dd1ab34..cdb3ed0ac 100644
--- a/src/org/traccar/protocol/DishaProtocol.java
+++ b/src/org/traccar/protocol/DishaProtocol.java
@@ -20,7 +20,6 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder;
import org.jboss.netty.handler.codec.string.StringDecoder;
import org.traccar.BaseProtocol;
-import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.TrackerServer;
import java.util.List;
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index aa941b7fc..3a0274269 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -56,9 +56,9 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder {
Position position = new Position();
position.setProtocol(getProtocolName());
- for (String key : params.keySet()) {
- String value = params.get(key).get(0);
- switch (key) {
+ for (Map.Entry<String, List<String>> entry : params.entrySet()) {
+ String value = entry.getValue().get(0);
+ switch (entry.getKey()) {
case "id":
case "deviceid":
if (!identify(value, channel, remoteAddress)) {
@@ -101,7 +101,7 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder {
position.set(Event.KEY_BATTERY, value);
break;
default:
- position.set(key, value);
+ position.set(entry.getKey(), value);
break;
}
}
diff --git a/src/org/traccar/protocol/ThinkRaceProtocolDecoder.java b/src/org/traccar/protocol/ThinkRaceProtocolDecoder.java
index a5a1ef784..678f96f2a 100644
--- a/src/org/traccar/protocol/ThinkRaceProtocolDecoder.java
+++ b/src/org/traccar/protocol/ThinkRaceProtocolDecoder.java
@@ -37,8 +37,9 @@ public class ThinkRaceProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_GPS = 0x90;
private static double convertCoordinate(long raw, boolean negative) {
- double result = raw / 1000000;
- result += (raw % 1000000) * 0.0001 / 60;
+ long degrees = raw / 1000000;
+ double minutes = (raw % 1000000) * 0.0001;
+ double result = degrees + minutes / 60;
if (negative) {
result = -result;
}