aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index dd5d4abd7..4414870d2 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -161,7 +161,11 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
.groupEnd()
.number("(?:(dd)(dd)(dd))?,") // time (hhmmss)
.groupEnd()
+ .groupBegin()
.expression("([ABV])?,") // validity
+ .or()
+ .number("(d+),") // coding scheme
+ .groupEnd()
.groupBegin()
.number("-(d+)-(d+.d+),") // latitude
.or()
@@ -279,6 +283,10 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
if (parser.hasNext()) {
position.setValid(parser.next().equals("A"));
}
+ if (parser.hasNext()) {
+ parser.nextInt(); // coding scheme
+ position.setValid(true);
+ }
if (parser.hasNext(2)) {
position.setLatitude(-parser.nextCoordinate());