From b73732d6a64d59259f39de9412050e5c38e52e65 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 18 May 2020 23:15:23 -0700 Subject: Fix coordinates decoding --- src/main/java/org/traccar/protocol/PstProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java index 23e2afbbd..68d32636c 100644 --- a/src/main/java/org/traccar/protocol/PstProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/PstProtocolDecoder.java @@ -50,7 +50,7 @@ public class PstProtocolDecoder extends BaseProtocolDecoder { long value = buf.readUnsignedInt(); int sign = BitUtil.check(value, 31) ? -1 : 1; value = BitUtil.to(value, 31); - return sign * (BitUtil.from(value, 16) + BitUtil.to(value, 16) * 0.00001) / 60; + return sign * (BitUtil.from(value, 16) + BitUtil.to(value, 16) / 10000.0) / 60; } @Override -- cgit v1.2.3