aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Tr20ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Tr20ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Tr20ProtocolDecoder.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/Tr20ProtocolDecoder.java b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
index 7afd905e4..d097ee3fe 100644
--- a/src/org/traccar/protocol/Tr20ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
@@ -104,22 +104,22 @@ public class Tr20ProtocolDecoder extends BaseProtocolDecoder {
// Latitude
int hemisphere = 1;
if (parser.group(index++).compareTo("S") == 0) hemisphere = -1;
- Double latitude = Double.valueOf(parser.group(index++));
- latitude += Double.valueOf(parser.group(index++)) / 60;
+ Double latitude = Double.parseDouble(parser.group(index++));
+ latitude += Double.parseDouble(parser.group(index++)) / 60;
position.setLatitude(latitude * hemisphere);
// Longitude
hemisphere = 1;
if (parser.group(index++).compareTo("W") == 0) hemisphere = -1;
- Double longitude = Double.valueOf(parser.group(index++));
- longitude += Double.valueOf(parser.group(index++)) / 60;
+ Double longitude = Double.parseDouble(parser.group(index++));
+ longitude += Double.parseDouble(parser.group(index++)) / 60;
position.setLongitude(longitude * hemisphere);
// Speed
- position.setSpeed(UnitsConverter.knotsFromKph(Double.valueOf(parser.group(index++))));
+ position.setSpeed(UnitsConverter.knotsFromKph(Double.parseDouble(parser.group(index++))));
// Course
- position.setCourse(Double.valueOf(parser.group(index++)));
+ position.setCourse(Double.parseDouble(parser.group(index++)));
return position;
}