diff options
author | jon-stumpf <jon.stumpf@gmail.com> | 2017-02-21 21:58:48 -0500 |
---|---|---|
committer | jon-stumpf <jon.stumpf@gmail.com> | 2017-02-21 21:58:48 -0500 |
commit | 7dfa56d7e85ad982bc5ed0cf8800a073d86240eb (patch) | |
tree | ef257802dce97e0c4ae941108e95d6b3dc80dd4c /src/org/traccar/protocol/CellocatorProtocolDecoder.java | |
parent | 21d8146fc216df827c156b446221c2bc01f05a6f (diff) | |
download | trackermap-server-7dfa56d7e85ad982bc5ed0cf8800a073d86240eb.tar.gz trackermap-server-7dfa56d7e85ad982bc5ed0cf8800a073d86240eb.tar.bz2 trackermap-server-7dfa56d7e85ad982bc5ed0cf8800a073d86240eb.zip |
Recorded KEY_SATELLITES in CellocatorProtocol;
Diffstat (limited to 'src/org/traccar/protocol/CellocatorProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/CellocatorProtocolDecoder.java | 4 |
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); |