aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/AutoFonProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/AutoFonProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/AutoFonProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/AutoFonProtocolDecoder.java b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
index 322ebd06e..29748f489 100644
--- a/src/org/traccar/protocol/AutoFonProtocolDecoder.java
+++ b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
@@ -39,9 +39,9 @@ public class AutoFonProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_HISTORY = 0x12;
private static double convertCoordinate(int raw) {
- double result = raw / 1000000;
- result += (raw % 1000000) / 600000.0;
- return result;
+ int degrees = raw / 1000000;
+ double minutes = (raw % 1000000) / 10000.0;
+ return degrees + minutes / 60;
}
private Position decodePosition(ChannelBuffer buf, boolean history) {