aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-12-29 07:35:39 -0800
committerAnton Tananaev <anton@traccar.org>2023-12-29 07:35:39 -0800
commita9e0e6531abf5370713cb1846f869e9d77fafdff (patch)
tree078879cf558dbb3efb8413938ec666c4c74d22bd /src/main
parent293a3dbf93b0d1924ecb96f8a3b11b65fbaa4248 (diff)
downloadtrackermap-server-a9e0e6531abf5370713cb1846f869e9d77fafdff.tar.gz
trackermap-server-a9e0e6531abf5370713cb1846f869e9d77fafdff.tar.bz2
trackermap-server-a9e0e6531abf5370713cb1846f869e9d77fafdff.zip
Improve basic GL200 pattern
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
index a73981614..ffeeab7de 100644
--- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -1405,15 +1405,19 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
.number("(d{15}|x{14}),") // imei
.any()
.text(",")
- .number("(d{1,2})?,") // hdop
- .number("(d{1,3}.d)?,") // speed
- .number("(d{1,3})?,") // course
- .number("(-?d{1,5}.d)?,") // altitude
- .number("(-?d{1,3}.d{6})?,") // longitude
- .number("(-?d{1,2}.d{6})?,") // latitude
+ .number("(d{1,2}),") // hdop
+ .groupBegin()
+ .number("(d{1,3}.d),") // speed
+ .number("(d{1,3}),") // course
+ .number("(-?d{1,5}.d),") // altitude
+ .number("(-?d{1,3}.d{6}),") // longitude
+ .number("(-?d{1,2}.d{6}),") // latitude
.number("(dddd)(dd)(dd)") // date (yyyymmdd)
- .number("(dd)(dd)(dd)").optional(2) // time (hhmmss)
+ .number("(dd)(dd)(dd)") // time (hhmmss)
.text(",")
+ .or()
+ .text(",,,,,,")
+ .groupEnd()
.number("(d+),") // mcc
.number("(d+),") // mnc
.number("(x+),") // lac