aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-21 22:35:50 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-02-21 22:35:50 -0500
commitb96c5afe15d06fedb76bcaf5445b4573c79ce60e (patch)
tree3c74b08415fcb292056f24b8242e674757c00dc0 /src/org
parent97fdf1bbf9f1595b22c9cb8ef5f20ca900a4e885 (diff)
downloadtrackermap-server-b96c5afe15d06fedb76bcaf5445b4573c79ce60e.tar.gz
trackermap-server-b96c5afe15d06fedb76bcaf5445b4573c79ce60e.tar.bz2
trackermap-server-b96c5afe15d06fedb76bcaf5445b4573c79ce60e.zip
Updated {Gpsmta,Mxt,Tt8850} Protocols to record Accuracy;
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/GpsmtaProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/MxtProtocolDecoder.java2
-rw-r--r--src/org/traccar/protocol/Tt8850ProtocolDecoder.java4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java
index 7360dbc1d..4436b7605 100644
--- a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java
+++ b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java
@@ -73,7 +73,7 @@ public class GpsmtaProtocolDecoder extends BaseProtocolDecoder {
position.setLongitude(parser.nextDouble());
position.setSpeed(parser.nextInt());
position.setCourse(parser.nextInt());
- parser.next();
+ position.setAccuracy(parser.nextInt());
position.setAltitude(parser.nextInt());
position.set(Position.KEY_STATUS, parser.nextInt());
diff --git a/src/org/traccar/protocol/MxtProtocolDecoder.java b/src/org/traccar/protocol/MxtProtocolDecoder.java
index eaeeacc97..bf1d3b342 100644
--- a/src/org/traccar/protocol/MxtProtocolDecoder.java
+++ b/src/org/traccar/protocol/MxtProtocolDecoder.java
@@ -134,7 +134,7 @@ public class MxtProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(infoGroups, 2)) {
position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
position.set(Position.KEY_HDOP, buf.readUnsignedByte());
- buf.readUnsignedByte(); // GPS accuracy
+ position.setAccuracy(buf.readUnsignedByte());
position.set(Position.KEY_RSSI, buf.readUnsignedByte());
buf.readUnsignedShort(); // time since boot
buf.readUnsignedByte(); // input voltage
diff --git a/src/org/traccar/protocol/Tt8850ProtocolDecoder.java b/src/org/traccar/protocol/Tt8850ProtocolDecoder.java
index 040783ba2..c9cb0bb28 100644
--- a/src/org/traccar/protocol/Tt8850ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tt8850ProtocolDecoder.java
@@ -79,7 +79,9 @@ public class Tt8850ProtocolDecoder extends BaseProtocolDecoder {
}
position.setDeviceId(deviceSession.getDeviceId());
- position.setValid(parser.nextInt() < 20);
+ int accuracy = parser.nextInt();
+ position.setValid(accuracy < 20);
+ position.setAccuracy(accuracy);
position.setSpeed(UnitsConverter.knotsFromKph(parser.nextDouble()));
position.setCourse(parser.nextDouble());
position.setAltitude(parser.nextDouble());