aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-09-26 08:47:32 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-09-26 08:47:32 -0700
commit324587697791186e89c4d7ae408062daa1e023b5 (patch)
treecb0fced07a229258fdf49622100d3323b3284897 /src/main/java/org
parent8f2c293e0fc7a0ddcfcc4aa86cbbfc01d5b098be (diff)
downloadtrackermap-server-324587697791186e89c4d7ae408062daa1e023b5.tar.gz
trackermap-server-324587697791186e89c4d7ae408062daa1e023b5.tar.bz2
trackermap-server-324587697791186e89c4d7ae408062daa1e023b5.zip
Fix location decoding
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/RstProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
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());