aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-16 07:52:29 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-16 07:52:29 +1300
commit25ecf5c05872b374d7b2065b07a35e6973baf914 (patch)
tree5d2483e2c8183995fad7bf8ff7c1c32d01a819d1 /src
parent9d9d259927bce0a9f046c79f88eceb0085ccb489 (diff)
downloadtrackermap-server-25ecf5c05872b374d7b2065b07a35e6973baf914.tar.gz
trackermap-server-25ecf5c05872b374d7b2065b07a35e6973baf914.tar.bz2
trackermap-server-25ecf5c05872b374d7b2065b07a35e6973baf914.zip
Decode HDOP value for GL200
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index 59f013313..c844de415 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -107,7 +107,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
.compile();
private static final Pattern PATTERN_LOCATION = new PatternBuilder()
- .number("(?:d{1,2})?,") // gps accuracy
+ .number("(d{1,2})?,") // hdop
.number("(d{1,3}.d)?,") // speed
.number("(d{1,3})?,") // course
.number("(-?d{1,5}.d)?,") // altitude
@@ -399,6 +399,8 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
}
private void decodeLocation(Position position, Parser parser) {
+ position.set(Position.KEY_HDOP, parser.next());
+
position.setSpeed(UnitsConverter.knotsFromKph(parser.nextDouble()));
position.setCourse(parser.nextDouble());
position.setAltitude(parser.nextDouble());