aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny S Maksimov <admin@vragam.net>2019-01-21 20:46:00 +0300
committerEvgeny S Maksimov <admin@vragam.net>2019-01-21 20:46:00 +0300
commit2bed80fa2bbc70f70de7abd230c1d13472f58cd3 (patch)
tree6fb15c95a0bdbc7a93275d9c39ce639a84e547dc
parent7706648481f9687eecc070b4678cc792d7811da7 (diff)
downloadtrackermap-server-2bed80fa2bbc70f70de7abd230c1d13472f58cd3.tar.gz
trackermap-server-2bed80fa2bbc70f70de7abd230c1d13472f58cd3.tar.bz2
trackermap-server-2bed80fa2bbc70f70de7abd230c1d13472f58cd3.zip
Detailing for visible satellites GPS and GLONASS
-rw-r--r--src/org/traccar/protocol/NavisProtocolDecoder.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java
index 39e3bdc0f..93e751012 100644
--- a/src/org/traccar/protocol/NavisProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavisProtocolDecoder.java
@@ -458,7 +458,22 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
case 69:
int satVisible = 0;
for (int k = 0; k < 8; k++) {
- satVisible += buf.readUnsignedByte();
+ switch (k) {
+ case 0:
+ int satVisibleGLONASS = buf.readUnsignedByte();
+ position.set("sat-visible-glonass", satVisibleGLONASS);
+ satVisible += satVisibleGLONASS;
+ break;
+ case 1:
+ int satVisibleGPS = buf.readUnsignedByte();
+ position.set("sat-visible-gps", satVisibleGPS);
+ satVisible += satVisibleGPS;
+ break;
+ default:
+ // Don't detalize Galileo, Compass, Beidou, DORIS, IRNSS, QZSS
+ satVisible += buf.readUnsignedByte();
+ break;
+ }
}
position.set(Position.KEY_SATELLITES_VISIBLE, satVisible);
break;