diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-09 12:38:25 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-09 12:38:25 +1300 |
commit | 24071162ec7cbae1c8a06e1e51837e9e9b2e8bdb (patch) | |
tree | b6ec19381bc02ea8440c3d75dd5c4d1e76a937ed /src/org/traccar | |
parent | 0b166ca5fc20f7b857b214209df2ce8c23eb168c (diff) | |
download | traccar-server-24071162ec7cbae1c8a06e1e51837e9e9b2e8bdb.tar.gz traccar-server-24071162ec7cbae1c8a06e1e51837e9e9b2e8bdb.tar.bz2 traccar-server-24071162ec7cbae1c8a06e1e51837e9e9b2e8bdb.zip |
Fix xt013 regex pattern (fix #1035)
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/Xt013ProtocolDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Xt013ProtocolDecoder.java b/src/org/traccar/protocol/Xt013ProtocolDecoder.java index 85048a93f..389ed3b59 100644 --- a/src/org/traccar/protocol/Xt013ProtocolDecoder.java +++ b/src/org/traccar/protocol/Xt013ProtocolDecoder.java @@ -44,10 +44,10 @@ public class Xt013ProtocolDecoder extends BaseProtocolDecoder { "(\\d{2})(\\d{2})(\\d{2})," + // Time (HHMMSS) "([+-]\\d+\\.\\d+)," + // Latitude "([+-]\\d+\\.\\d+)," + // Longitude - "(\\d+)," + // Altitude - "(\\d+)," + // Course "(\\d+)," + // Speed + "(\\d+)," + // Course "\\d+," + + "(\\d+)," + // Altitude "([FL])," + // GPS fix "\\d+," + "(\\d+)," + // GPS level @@ -100,9 +100,9 @@ public class Xt013ProtocolDecoder extends BaseProtocolDecoder { // Location position.setLatitude(Double.valueOf(parser.group(index++))); position.setLongitude(Double.valueOf(parser.group(index++))); - position.setAltitude(Double.valueOf(parser.group(index++))); + position.setSpeed(Double.valueOf(parser.group(index++)) * 0.539957); position.setCourse(Double.valueOf(parser.group(index++))); - position.setSpeed(Double.valueOf(parser.group(index++))); + position.setAltitude(Double.valueOf(parser.group(index++))); position.setValid(parser.group(index++).equals("F")); // Other |