aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-11-25 17:19:13 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-11-25 17:19:13 -0800
commit0fea1a39bea08a43771fc08becdf5d7f2f392531 (patch)
tree51855a1fc2f492ad89922388d28cb9c2d3f7f4b4 /src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
parentd9b8f1e2c0a61438136954671c91445bbae6b76e (diff)
downloadtrackermap-server-0fea1a39bea08a43771fc08becdf5d7f2f392531.tar.gz
trackermap-server-0fea1a39bea08a43771fc08becdf5d7f2f392531.tar.bz2
trackermap-server-0fea1a39bea08a43771fc08becdf5d7f2f392531.zip
Fix status decoding
Diffstat (limited to 'src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
index f3b70e40c..86c89e336 100644
--- a/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MobilogixProtocolDecoder.java
@@ -47,9 +47,9 @@ public class MobilogixProtocolDecoder extends BaseProtocolDecoder {
.number("(d+.d+)") // battery
.groupBegin()
.text(",")
- .number("(d)") // valid
+ .number("(d)") // satellites
.number("(d)") // rssi
- .number("(d),") // satellites
+ .number("(d),") // valid
.number("(-?d+.d+),") // latitude
.number("(-?d+.d+),") // longitude
.number("(d+.?d*),") // speed
@@ -127,12 +127,12 @@ public class MobilogixProtocolDecoder extends BaseProtocolDecoder {
if (parser.hasNext(7)) {
+ position.set(Position.KEY_SATELLITES, parser.nextInt());
+ position.set(Position.KEY_RSSI, 6 * parser.nextInt() - 111);
+
position.setValid(parser.nextInt() > 0);
position.setFixTime(position.getDeviceTime());
- position.set(Position.KEY_RSSI, parser.nextInt());
- position.set(Position.KEY_SATELLITES, parser.nextInt());
-
position.setLatitude(parser.nextDouble());
position.setLongitude(parser.nextDouble());
position.setSpeed(UnitsConverter.knotsFromKph(parser.nextDouble()));