diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-28 16:45:30 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-04-28 16:45:30 +1200 |
commit | 4f235bcac5b13733684fed8e0ef05968123f6e10 (patch) | |
tree | 72886b7edfaf774debb15ae7a6958267b3bfe402 /src/org/traccar | |
parent | 1f3185d8a06f5d8cd3c05c15cbb7abbbfa81af37 (diff) | |
download | trackermap-server-4f235bcac5b13733684fed8e0ef05968123f6e10.tar.gz trackermap-server-4f235bcac5b13733684fed8e0ef05968123f6e10.tar.bz2 trackermap-server-4f235bcac5b13733684fed8e0ef05968123f6e10.zip |
Fix Antlanta L-100 regex pattern
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/L100ProtocolDecoder.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/L100ProtocolDecoder.java b/src/org/traccar/protocol/L100ProtocolDecoder.java index f98e532bc..618448080 100644 --- a/src/org/traccar/protocol/L100ProtocolDecoder.java +++ b/src/org/traccar/protocol/L100ProtocolDecoder.java @@ -40,8 +40,9 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder { .text("ATL") .number("(d{15}),") // imei .text("$GPRMC,") - .number("(dd)(dd)(dd).(ddd),") // time (hhmmss.sss) - .expression("([AV]),") // validity + .number("(dd)(dd)(dd)") // time (hhmmss.sss) + .number(".(ddd)").optional() + .expression(",([AV]),") // validity .number("(dd)(dd.d+),") // latitude .expression("([NS]),") .number("(ddd)(dd.d+),") // longitude @@ -52,7 +53,7 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder { .any() .text("#") .number("([01]+),") // io status - .number("(d+.d+|N.C),") // adc + .number("(d+.?d*|N.C),") // adc .expression("[^,]*,") // reserved .expression("[^,]*,") // reserved .number("(d+.d+),") // odometer @@ -61,8 +62,8 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder { .number("(d+),") // gsm .number("(d+),") // mcc .number("(d+),") // mnc - .number("(d+),") // lac - .number("(d+)") // cid + .number("(x+),") // lac + .number("(x+)") // cid .text("ATL") .compile(); @@ -111,7 +112,7 @@ public class L100ProtocolDecoder extends BaseProtocolDecoder { int rssi = parser.nextInt(0); position.setNetwork(new Network(CellTower.from( - parser.nextInt(0), parser.nextInt(0), parser.nextInt(0), parser.nextInt(0), rssi))); + parser.nextInt(0), parser.nextInt(0), parser.nextHexInt(0), parser.nextHexInt(0), rssi))); return position; } |