aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-02 21:12:32 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-06-02 21:12:32 -0700
commit53b65b11f31e53c6d612aa56ebe94d29d649f934 (patch)
tree5799c38bda012728413e5092dcc927fd3172185a
parent62d3f574104bb5196f732182faa6099207f68e9e (diff)
downloadtrackermap-server-53b65b11f31e53c6d612aa56ebe94d29d649f934.tar.gz
trackermap-server-53b65b11f31e53c6d612aa56ebe94d29d649f934.tar.bz2
trackermap-server-53b65b11f31e53c6d612aa56ebe94d29d649f934.zip
Decode GSM signal and satellites
-rw-r--r--src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java
index 9bed63266..70972f847 100644
--- a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java
@@ -23,6 +23,7 @@ import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
+import org.traccar.helper.BitUtil;
import org.traccar.helper.Checksum;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
@@ -187,7 +188,12 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder {
position.setAltitude(parser.nextInt());
position.set(Position.KEY_ODOMETER, parser.nextLong());
- position.set(Position.KEY_STATUS, parser.nextHexLong());
+
+ long status = parser.nextHexLong();
+ position.set(Position.KEY_RSSI, BitUtil.between(status, 3, 8));
+ position.set(Position.KEY_SATELLITES, BitUtil.from(status, 28));
+ position.set(Position.KEY_STATUS, status);
+
position.set(Position.KEY_INPUT, parser.nextHexInt());
position.set(Position.KEY_OUTPUT, parser.nextHexInt());