From 324587697791186e89c4d7ae408062daa1e023b5 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 26 Sep 2019 08:47:32 -0700 Subject: Fix location decoding --- src/main/java/org/traccar/protocol/RstProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/RstProtocolDecoder.java b/src/main/java/org/traccar/protocol/RstProtocolDecoder.java index db2c35c3f..7b6d2f042 100644 --- a/src/main/java/org/traccar/protocol/RstProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RstProtocolDecoder.java @@ -45,8 +45,8 @@ public class RstProtocolDecoder extends BaseProtocolDecoder { .number("(dd):(dd):(dd);") // event time .number("(dd)-(dd)-(dddd) ") // fix date .number("(dd):(dd):(dd);") // fix time - .number("(-?d+.d+);") // longitude .number("(-?d+.d+);") // latitude + .number("(-?d+.d+);") // longitude .number("(d+);") // speed .number("(d+);") // course .number("(-?d+);") // altitude @@ -88,8 +88,8 @@ public class RstProtocolDecoder extends BaseProtocolDecoder { position.setDeviceTime(parser.nextDateTime(Parser.DateTimeFormat.DMY_HMS)); position.setFixTime(parser.nextDateTime(Parser.DateTimeFormat.DMY_HMS)); - position.setLongitude(parser.nextDouble()); position.setLatitude(parser.nextDouble()); + position.setLongitude(parser.nextDouble()); position.setSpeed(UnitsConverter.knotsFromKph(parser.nextInt())); position.setCourse(parser.nextInt()); position.setAltitude(parser.nextInt()); -- cgit v1.2.3