diff options
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/Stl060ProtocolDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Stl060ProtocolDecoder.java b/src/org/traccar/protocol/Stl060ProtocolDecoder.java index b5a67dbab..211483aed 100644 --- a/src/org/traccar/protocol/Stl060ProtocolDecoder.java +++ b/src/org/traccar/protocol/Stl060ProtocolDecoder.java @@ -40,8 +40,8 @@ public class Stl060ProtocolDecoder extends BaseProtocolDecoder { "[^,]*," + // Vehicle "(\\d{2})/(\\d{2})/(\\d{2})," + // Date "(\\d{2}):(\\d{2}):(\\d{2})," + // Time - "(\\d{2})(\\d+)([NS])," + // Latitude - "(\\d{3})(\\d+)([EW])," + // Longitude + "(\\d{2})(\\d{2})\\.?(\\d+)([NS])," + // Latitude + "(\\d{3})(\\d{2})\\.?(\\d+)([EW])," + // Longitude "(\\d+\\.?\\d*)," + // Speed "(\\d+\\.?\\d*)," + // Course "(\\d+)," + // Milage @@ -95,13 +95,13 @@ public class Stl060ProtocolDecoder extends BaseProtocolDecoder { // Latitude Double latitude = Double.valueOf(parser.group(index++)); - latitude += Double.valueOf(parser.group(index++)) / 600000; + latitude += Double.valueOf(parser.group(index++) + parser.group(index++)) / 600000; 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++)) / 600000; + longitude += Double.valueOf(parser.group(index++) + parser.group(index++)) / 600000; if (parser.group(index++).compareTo("W") == 0) longitude = -longitude; position.setLongitude(longitude); |