aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java2
-rw-r--r--src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
index 992b5c43a..652ba3f6a 100644
--- a/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MictrackProtocolDecoder.java
@@ -54,7 +54,7 @@ public class MictrackProtocolDecoder extends BaseProtocolDecoder {
.expression("([EW]),")
.number("(d+.?d*)?,") // speed
.number("(d+.?d*)?,") // course
- .number("(d+.?d*)?,") // altitude
+ .number("(-?d+.?d*)?,") // altitude
.number("(dd)(dd)(dd)") // date (ddmmyy)
.compile();
diff --git a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
index 5c9e74a2d..4c17bf1f8 100644
--- a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
@@ -48,6 +48,9 @@ public class MictrackProtocolDecoderTest extends ProtocolTest {
var decoder = new MictrackProtocolDecoder(null);
verifyPositions(decoder, text(
+ "861836051888035$162835.00,A,4139.6460,N,07009.7239,W,,41.53,-25.8,220621"));
+
+ verifyPositions(decoder, text(
"861108032038761$062232.00,A,2238.2832,N,11401.7381,E,0.01,309.62,95.0,131117"));
verifyPositions(decoder, text(