aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GoSafeProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-22 22:19:16 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-22 22:19:16 +1300
commitd0388c562044e25998814724514f7af7df80b9ae (patch)
tree9fe5adde4b8bf9527f3bed336524e19e90f2d324 /src/org/traccar/protocol/GoSafeProtocolDecoder.java
parent3d7d201b33081ae08a6c6b95ba339f34cc6961c9 (diff)
downloadtrackermap-server-d0388c562044e25998814724514f7af7df80b9ae.tar.gz
trackermap-server-d0388c562044e25998814724514f7af7df80b9ae.tar.bz2
trackermap-server-d0388c562044e25998814724514f7af7df80b9ae.zip
Extend KHD protocol support
Diffstat (limited to 'src/org/traccar/protocol/GoSafeProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GoSafeProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
index 94d12e989..96f745917 100644
--- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java
+++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
@@ -64,7 +64,7 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
.number("(d+);") // course
.number("(d+);") // altitude
.number("(d+.d+)") // hdop
- .number("(?:;d+.d+)?") // vdop
+ .number(";(d+.d+)").optional() // vdop
.expression(",?")
.groupEnd()
.groupBegin()
@@ -154,7 +154,8 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(parser.nextDouble());
position.setAltitude(parser.nextDouble());
- position.set(Position.KEY_HDOP, parser.next());
+ position.set(Position.KEY_HDOP, parser.nextDouble());
+ position.set(Position.KEY_VDOP, parser.nextDouble());
if (parser.hasNext(5)) {
position.setNetwork(new Network(CellTower.from(