diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-03-03 11:17:01 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-03-03 11:17:01 +1300 |
commit | 9eb532a1193ed7a00c60a04e2d839a4e611992fd (patch) | |
tree | 06c0718f5fdb61cb264dc783a750bf3d3b18f57a /src/org/traccar | |
parent | 019c3acb9245fac1a072400676193f0696c512d7 (diff) | |
download | trackermap-server-9eb532a1193ed7a00c60a04e2d839a4e611992fd.tar.gz trackermap-server-9eb532a1193ed7a00c60a04e2d839a4e611992fd.tar.bz2 trackermap-server-9eb532a1193ed7a00c60a04e2d839a4e611992fd.zip |
Support additional TAIP attributes
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/TaipProtocolDecoder.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java index 81bebdef7..9555d19e9 100644 --- a/src/org/traccar/protocol/TaipProtocolDecoder.java +++ b/src/org/traccar/protocol/TaipProtocolDecoder.java @@ -67,6 +67,19 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder { .number("(ddd)") // battery .number("(x{8})") // odometer .number("[01]") // gps power + .groupBegin() + .number("[23]") // fix mode + .number("(dd)") // pdop + .number("dd") // satellites + .number("xxxx") // seconds from last + .number("[01]") // modem power + .number("[0-5]") // gsm status + .number("(dd)") // rssi + .number("([-+]dddd)") // temperature 1 + .number("xx") // seconds from last + .number("([-+]dddd)") // temperature 2 + .number("xx") // seconds from last + .groupEnd("?") .groupEnd("?") .any() .compile(); @@ -160,6 +173,13 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_ODOMETER, parser.nextLong(16, 0)); } + if (parser.hasNext(4)) { + position.set(Position.KEY_PDOP, parser.nextInt()); + position.set(Position.KEY_RSSI, parser.nextInt()); + position.set(Position.PREFIX_TEMP + 1, parser.nextInt() * 0.01); + position.set(Position.PREFIX_TEMP + 2, parser.nextInt() * 0.01); + } + position.setValid(true); String[] attributes = null; |