aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TrackboxProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-07 14:30:28 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-07 14:30:28 +1300
commit4a5961a98b0b6576e4c6553435a70a7bca3f9b44 (patch)
treefa7d6f8f790c7a439b12c552c148b675950f1c80 /src/org/traccar/protocol/TrackboxProtocolDecoder.java
parente7bc5f93cd05f27f41bfb25836a04feb511adc17 (diff)
downloadtrackermap-server-4a5961a98b0b6576e4c6553435a70a7bca3f9b44.tar.gz
trackermap-server-4a5961a98b0b6576e4c6553435a70a7bca3f9b44.tar.bz2
trackermap-server-4a5961a98b0b6576e4c6553435a70a7bca3f9b44.zip
Replace Double.valueOf with parseDouble
Diffstat (limited to 'src/org/traccar/protocol/TrackboxProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TrackboxProtocolDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/TrackboxProtocolDecoder.java b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
index a5093ab0e..7db437a6e 100644
--- a/src/org/traccar/protocol/TrackboxProtocolDecoder.java
+++ b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
@@ -90,14 +90,14 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
time.set(Calendar.MILLISECOND, Integer.parseInt(parser.group(index++)));
// Latitude
- 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;
if (parser.group(index++).compareTo("S") == 0) latitude = -latitude;
position.setLatitude(latitude);
// Longitude
- 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;
if (parser.group(index++).compareTo("W") == 0) longitude = -longitude;
position.setLongitude(longitude);
@@ -105,7 +105,7 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
position.set(Event.KEY_HDOP, parser.group(index++));
// Altitude
- position.setAltitude(Double.valueOf(parser.group(index++)));
+ position.setAltitude(Double.parseDouble(parser.group(index++)));
// Validity
int fix = Integer.parseInt(parser.group(index++));
@@ -113,11 +113,11 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
position.setValid(fix > 0);
// Course
- position.setCourse(Double.valueOf(parser.group(index++)));
+ position.setCourse(Double.parseDouble(parser.group(index++)));
// Speed
index += 1; // speed in kph
- position.setSpeed(Double.valueOf(parser.group(index++)));
+ position.setSpeed(Double.parseDouble(parser.group(index++)));
// Date
time.set(Calendar.DAY_OF_MONTH, Integer.parseInt(parser.group(index++)));