aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}