aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/PricolProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-14 12:08:32 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-14 12:08:32 +1200
commit5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd (patch)
treeed55d93b734b4becbad9a837b80c6728b3156753 /src/org/traccar/protocol/PricolProtocolDecoder.java
parent051aeacefdf71959fcef25b33e1c139c845fddf5 (diff)
downloadtrackermap-server-5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd.tar.gz
trackermap-server-5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd.tar.bz2
trackermap-server-5c6a4302bb8ea3280d2f6633bd1017f9c6d21abd.zip
Fix FindBugs issues
Diffstat (limited to 'src/org/traccar/protocol/PricolProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/PricolProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/PricolProtocolDecoder.java b/src/org/traccar/protocol/PricolProtocolDecoder.java
index a33e19b90..dd804d8bd 100644
--- a/src/org/traccar/protocol/PricolProtocolDecoder.java
+++ b/src/org/traccar/protocol/PricolProtocolDecoder.java
@@ -63,11 +63,11 @@ public class PricolProtocolDecoder extends BaseProtocolDecoder {
position.setValid(true);
- double lat = buf.getUnsignedShort(buf.readerIndex()) / 100;
+ double lat = (double) (buf.getUnsignedShort(buf.readerIndex()) / 100);
lat += (buf.readUnsignedShort() % 100 * 10000 + buf.readUnsignedShort()) / 600000.0;
position.setLatitude(buf.readUnsignedByte() == 'S' ? -lat : lat);
- double lon = buf.getUnsignedMedium(buf.readerIndex()) / 100;
+ double lon = (double) (buf.getUnsignedMedium(buf.readerIndex()) / 100);
lon += (buf.readUnsignedMedium() % 100 * 10000 + buf.readUnsignedShort()) / 600000.0;
position.setLongitude(buf.readUnsignedByte() == 'W' ? -lon : lon);