aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NavigilProtocolDecoder.java
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-03-04 22:42:20 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-03-04 22:42:20 -0500
commitf7da653ee14f471cf3d482690e7c659297514ab9 (patch)
tree886e617550b494d32444ac8c2eec155a5b56dbc1 /src/org/traccar/protocol/NavigilProtocolDecoder.java
parent525db3566a9e17f626d34e498c85e02d382d6655 (diff)
downloadtrackermap-server-f7da653ee14f471cf3d482690e7c659297514ab9.tar.gz
trackermap-server-f7da653ee14f471cf3d482690e7c659297514ab9.tar.bz2
trackermap-server-f7da653ee14f471cf3d482690e7c659297514ab9.zip
Removed old comments that have been made redundant, as requested;
Diffstat (limited to 'src/org/traccar/protocol/NavigilProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/NavigilProtocolDecoder.java42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/org/traccar/protocol/NavigilProtocolDecoder.java b/src/org/traccar/protocol/NavigilProtocolDecoder.java
index e0db3d92b..360b9c81c 100644
--- a/src/org/traccar/protocol/NavigilProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavigilProtocolDecoder.java
@@ -89,25 +89,25 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
buf.readUnsignedShort(); // report trigger
- position.set(Position.KEY_FLAGS, buf.readUnsignedShort()); // flags
+ position.set(Position.KEY_FLAGS, buf.readUnsignedShort());
position.setLatitude(buf.readInt() * 0.0000001);
position.setLongitude(buf.readInt() * 0.0000001);
position.setAltitude(buf.readUnsignedShort());
- position.set(Position.KEY_SATELLITES, buf.readUnsignedShort()); // satellites in fix
- position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedShort()); // satellites in track
- position.set("gpsAntennaState", buf.readUnsignedShort()); // GPS antenna state
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedShort());
+ position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedShort());
+ position.set("gpsAntennaState", buf.readUnsignedShort());
position.setSpeed(buf.readUnsignedShort() * 0.194384);
position.setCourse(buf.readUnsignedShort());
- position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); // distance in meters
- position.set(Position.KEY_DISTANCE, buf.readUnsignedInt()); // delta distance in meters
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
+ position.set(Position.KEY_DISTANCE, buf.readUnsignedInt());
position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001);
- position.set(Position.KEY_CHARGE, buf.readUnsignedShort()); // battery charger status
+ position.set(Position.KEY_CHARGE, buf.readUnsignedShort());
position.setTime(convertTimestamp(buf.readUnsignedInt()));
@@ -133,15 +133,15 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(buf.readInt() * 0.0000001);
position.setAltitude(buf.readUnsignedShort());
- position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); // satellites in fix
- position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedByte()); // satellites in track
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
+ position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedByte());
position.setSpeed(buf.readUnsignedShort() * 0.194384);
position.setCourse(buf.readUnsignedShort());
- position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); // distance
- position.set("maximumSpeed", buf.readUnsignedShort()); // maximum speed
- position.set("minimumSpeed", buf.readUnsignedShort()); // minimum speed
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
+ position.set("maximumSpeed", buf.readUnsignedShort());
+ position.set("minimumSpeed", buf.readUnsignedShort());
position.set(Position.PREFIX_IO + 1, buf.readUnsignedShort()); // VSAUT1 voltage
position.set(Position.PREFIX_IO + 2, buf.readUnsignedShort()); // VSAUT2 voltage
@@ -195,7 +195,7 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setValid((flags & 0x80) == 0x80 && (flags & 0x40) == 0x40);
position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
- position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); // distance
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
return position;
}
@@ -222,15 +222,15 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(buf.readInt() * 0.0000001);
position.setAltitude(buf.readUnsignedShort());
- position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); // satellites in fix
- position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedByte()); // satellites in track
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
+ position.set(Position.KEY_SATELLITES_VISIBLE, buf.readUnsignedByte());
position.setSpeed(buf.readUnsignedShort() * 0.194384);
position.setCourse(buf.readUnsignedShort() * 0.1);
- position.set("maximumSpeed", buf.readUnsignedByte()); // maximum speed
- position.set("minimumSpeed", buf.readUnsignedByte()); // minimum speed
- position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); // distance
+ position.set("maximumSpeed", buf.readUnsignedByte());
+ position.set("minimumSpeed", buf.readUnsignedByte());
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
position.set(Position.PREFIX_IO + 1, buf.readUnsignedByte()); // supply voltage 1
position.set(Position.PREFIX_IO + 2, buf.readUnsignedByte()); // supply voltage 2
@@ -261,11 +261,9 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
position.setCourse(buf.readUnsignedByte() * 2.0);
- position.set(Position.KEY_SATELLITES, buf.readUnsignedByte()); // satellites in fix
-
+ position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001);
-
- position.set(Position.KEY_ODOMETER, buf.readUnsignedInt()); // distance
+ position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
return position;
}