diff options
-rw-r--r-- | src/org/traccar/protocol/GpsmtaProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/MxtProtocolDecoder.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/Tt8850ProtocolDecoder.java | 4 |
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()); |