aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-02-21 21:58:48 -0500
committerjon-stumpf <jon.stumpf@gmail.com>2017-02-21 21:58:48 -0500
commit7dfa56d7e85ad982bc5ed0cf8800a073d86240eb (patch)
treeef257802dce97e0c4ae941108e95d6b3dc80dd4c /src/org/traccar/protocol
parent21d8146fc216df827c156b446221c2bc01f05a6f (diff)
downloadtraccar-server-7dfa56d7e85ad982bc5ed0cf8800a073d86240eb.tar.gz
traccar-server-7dfa56d7e85ad982bc5ed0cf8800a073d86240eb.tar.bz2
traccar-server-7dfa56d7e85ad982bc5ed0cf8800a073d86240eb.zip
Recorded KEY_SATELLITES in CellocatorProtocol;
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/CellocatorProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
index 7df8cad8a..970f0ee4c 100644
--- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
@@ -137,7 +137,9 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // mode 1
buf.readUnsignedByte(); // mode 2
- position.setValid(buf.readUnsignedByte() >= 3); // satellites
+ int satellites = buf.readUnsignedByte();
+ position.setValid(satellites >= 3);
+ position.set(Position.KEY_SATELLITES, satellites);
position.setLongitude(buf.readInt() / Math.PI * 180 / 100000000);
position.setLatitude(buf.readInt() / Math.PI * 180 / 100000000.0);