diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-10-25 22:11:00 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-10-25 22:11:00 +1300 |
commit | 594992c7a2c200a8b9b398bb58d1e7393c2e006c (patch) | |
tree | 6c1632f2cef3682f43f65bff0be9adc34623a72f /src/org | |
parent | fa9d7dbce38370a82d59494dec698b2177a45ec2 (diff) | |
download | trackermap-server-594992c7a2c200a8b9b398bb58d1e7393c2e006c.tar.gz trackermap-server-594992c7a2c200a8b9b398bb58d1e7393c2e006c.tar.bz2 trackermap-server-594992c7a2c200a8b9b398bb58d1e7393c2e006c.zip |
Add missing genx parameters
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/GenxProtocolDecoder.java | 19 |
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; } |