aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java16
-rw-r--r--test/org/traccar/protocol/T55ProtocolDecoderTest.java3
2 files changed, 5 insertions, 14 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index 57810be3b..b95b9fc5a 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -26,19 +26,10 @@ import org.traccar.ServerManager;
import org.traccar.helper.Log;
import org.traccar.model.Position;
-/**
- * T55 tracker protocol decoder
- */
public class T55ProtocolDecoder extends BaseProtocolDecoder {
- /**
- * Device ID
- */
private Long deviceId;
- /**
- * Initialize
- */
public T55ProtocolDecoder(ServerManager serverManager) {
super(serverManager);
}
@@ -54,14 +45,11 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
"([NS])," +
"(\\d{3})(\\d{2}\\.\\d+)," + // Longitude (DDDMM.MMMM)
"([EW])," +
- "(\\d+\\.\\d{2})?," + // Speed
- "(\\d+\\.\\d{2})?," + // Course
+ "(\\d+\\.?\\d*)?," + // Speed
+ "(\\d+\\.?\\d*)?," + // Course
"(\\d{2})(\\d{2})(\\d{2})" + // Date (DDMMYY)
".+"); // Other (Checksumm)
- /**
- * Decode message
- */
@Override
protected Object decode(
ChannelHandlerContext ctx, Channel channel, Object msg)
diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
index 6d639ee8c..f7aac7030 100644
--- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
@@ -19,6 +19,9 @@ public class T55ProtocolDecoderTest {
assertNotNull(decoder.decode(null, null,
"$GPRMC,115528.000,A,6000.5432,N,03020.4948,E,,,091111,,*06"));
+
+ assertNotNull(decoder.decode(null, null,
+ "$GPRMC,064411.000,A,3717.240078,N,00603.046984,W,0.000,1,010313,,,A*6C"));
}