aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-10-25 22:11:00 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-10-25 22:11:00 +1300
commit594992c7a2c200a8b9b398bb58d1e7393c2e006c (patch)
tree6c1632f2cef3682f43f65bff0be9adc34623a72f /src/org/traccar
parentfa9d7dbce38370a82d59494dec698b2177a45ec2 (diff)
downloadtraccar-server-594992c7a2c200a8b9b398bb58d1e7393c2e006c.tar.gz
traccar-server-594992c7a2c200a8b9b398bb58d1e7393c2e006c.tar.bz2
traccar-server-594992c7a2c200a8b9b398bb58d1e7393c2e006c.zip
Add missing genx parameters
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/GenxProtocolDecoder.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/GenxProtocolDecoder.java b/src/org/traccar/protocol/GenxProtocolDecoder.java
index 3b716796c..ebf6f2b53 100644
--- a/src/org/traccar/protocol/GenxProtocolDecoder.java
+++ b/src/org/traccar/protocol/GenxProtocolDecoder.java
@@ -19,6 +19,7 @@ import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.Context;
import org.traccar.DeviceSession;
+import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;
import java.net.SocketAddress;
@@ -68,6 +69,24 @@ public class GenxProtocolDecoder extends BaseProtocolDecoder {
case 4:
position.setLongitude(Double.parseDouble(values[i]));
break;
+ case 11:
+ position.set(Position.KEY_IGNITION, values[i].equals("ON"));
+ break;
+ case 13:
+ position.setSpeed(UnitsConverter.knotsFromKph(Integer.parseInt(values[i])));
+ break;
+ case 17:
+ position.setCourse(Integer.parseInt(values[i]));
+ break;
+ case 23:
+ position.set(Position.KEY_ODOMETER, Double.parseDouble(values[i]) * 1000);
+ break;
+ case 27:
+ position.setAltitude(UnitsConverter.metersFromFeet(Integer.parseInt(values[i])));
+ break;
+ case 46:
+ position.set(Position.KEY_SATELLITES, Integer.parseInt(values[i]));
+ break;
default:
break;
}