aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-09-28 10:17:47 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-09-28 10:17:47 -0700
commitfa99ec021a056dfb953b29a23e8b02c13fa1267e (patch)
tree04da5c7f39fd704288b3b9a28730da75b00da485 /src/main/java
parent324587697791186e89c4d7ae408062daa1e023b5 (diff)
downloadtrackermap-server-fa99ec021a056dfb953b29a23e8b02c13fa1267e.tar.gz
trackermap-server-fa99ec021a056dfb953b29a23e8b02c13fa1267e.tar.bz2
trackermap-server-fa99ec021a056dfb953b29a23e8b02c13fa1267e.zip
Decode validity flag
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/UlbotechProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/UlbotechProtocolDecoder.java b/src/main/java/org/traccar/protocol/UlbotechProtocolDecoder.java
index 0a2a59e23..7fec0bf8b 100644
--- a/src/main/java/org/traccar/protocol/UlbotechProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/UlbotechProtocolDecoder.java
@@ -237,12 +237,13 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder {
case DATA_GPS:
hasLocation = true;
- position.setValid(true);
position.setLatitude(buf.readInt() / 1000000.0);
position.setLongitude(buf.readInt() / 1000000.0);
position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedShort()));
position.setCourse(buf.readUnsignedShort());
- position.set(Position.KEY_HDOP, buf.readUnsignedShort());
+ int hdop = buf.readUnsignedShort();
+ position.setValid(hdop < 9999);
+ position.set(Position.KEY_HDOP, hdop * 0.01);
break;
case DATA_LBS: