aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NavigilProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-21 21:32:31 +1300
committerGitHub <noreply@github.com>2017-02-21 21:32:31 +1300
commit6838a1264922e656da2ed8b4ce390fa17e039571 (patch)
tree0a66e360c6d3b13f24c60e5300985ce121a6b25c /src/org/traccar/protocol/NavigilProtocolDecoder.java
parent6ad0ee71f38feb1f4c57c0b22815038a0273e4c5 (diff)
parent888c392af40187f3a0ecc3395495db9acd85b827 (diff)
downloadtrackermap-server-6838a1264922e656da2ed8b4ce390fa17e039571.tar.gz
trackermap-server-6838a1264922e656da2ed8b4ce390fa17e039571.tar.bz2
trackermap-server-6838a1264922e656da2ed8b4ce390fa17e039571.zip
Merge pull request #2906 from jon-stumpf/jss-minifinder
MiniFinder Updates
Diffstat (limited to 'src/org/traccar/protocol/NavigilProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/NavigilProtocolDecoder.java16
1 files changed, 8 insertions, 8 deletions
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);