aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/Avl301ProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/NavigilProtocolDecoder.java16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/Avl301ProtocolDecoder.java b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
index c19b96cb9..cc61be91b 100644
--- a/src/org/traccar/protocol/Avl301ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
@@ -100,7 +100,7 @@ public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
int gpsLength = buf.readUnsignedByte(); // gps len and sat
position.set(Position.KEY_SATELLITES, gpsLength & 0xf);
- buf.readUnsignedByte(); // satellites
+ position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedByte()); // satellites
double latitude = buf.readUnsignedInt() / 600000.0;
double longitude = buf.readUnsignedInt() / 600000.0;
diff --git a/src/org/traccar/protocol/NavigilProtocolDecoder.java b/src/org/traccar/protocol/NavigilProtocolDecoder.java
index d18217861..263e5fc2b 100644
--- a/src/org/traccar/protocol/NavigilProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavigilProtocolDecoder.java
@@ -95,8 +95,8 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(buf.readInt() * 0.0000001);
position.setAltitude(buf.readUnsignedShort());
- buf.readUnsignedShort(); // satellites in fix
- buf.readUnsignedShort(); // satellites in track
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedShort()); // satellites in fix
+ position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedShort()); // satellites in track
buf.readUnsignedShort(); // GPS antenna state
position.setSpeed(buf.readUnsignedShort() * 0.194384);
@@ -107,7 +107,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001);
- buf.readUnsignedShort(); // battery charger status
+ position.set(Position.KEY_CHARGE, buf.readUnsignedShort()); // battery charger status
position.setTime(convertTimestamp(buf.readUnsignedInt()));
@@ -133,8 +133,8 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(buf.readInt() * 0.0000001);
position.setAltitude(buf.readUnsignedShort());
- buf.readUnsignedByte(); // satellites in fix
- buf.readUnsignedByte(); // satellites in track
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); // satellites in fix
+ position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedByte()); // satellites in track
position.setSpeed(buf.readUnsignedShort() * 0.194384);
position.setCourse(buf.readUnsignedShort());
@@ -219,8 +219,8 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(buf.readInt() * 0.0000001);
position.setAltitude(buf.readUnsignedShort());
- buf.readUnsignedByte(); // satellites in fix
- buf.readUnsignedByte(); // satellites in track
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); // satellites in fix
+ position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedByte()); // satellites in track
position.setSpeed(buf.readUnsignedShort() * 0.194384);
position.setCourse(buf.readUnsignedShort() * 0.1);
@@ -258,7 +258,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
position.setCourse(buf.readUnsignedByte() * 2.0);
- buf.readUnsignedByte(); // satellites in fix
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); // satellites in fix
position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001);