diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-02-22 22:19:16 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-02-22 22:19:16 +1300 |
commit | d0388c562044e25998814724514f7af7df80b9ae (patch) | |
tree | 9fe5adde4b8bf9527f3bed336524e19e90f2d324 /src/org/traccar/protocol/GoSafeProtocolDecoder.java | |
parent | 3d7d201b33081ae08a6c6b95ba339f34cc6961c9 (diff) | |
download | trackermap-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.java | 5 |
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( |