aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/WialonProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/WialonProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WialonProtocolDecoder.java b/src/org/traccar/protocol/WialonProtocolDecoder.java
index 7939c7b67..de7073b67 100644
--- a/src/org/traccar/protocol/WialonProtocolDecoder.java
+++ b/src/org/traccar/protocol/WialonProtocolDecoder.java
@@ -47,7 +47,7 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder {
.expression("([EW]);")
.number("(d+.?d*)?;") // speed
.number("(d+.?d*)?;") // course
- .number("(?:NA|(d+.?d*));") // altitude
+ .number("(?:NA|(-?d+.?d*));") // altitude
.number("(?:NA|(d+))") // satellites
.groupBegin().text(";")
.number("(?:NA|(d+.?d*));") // hdop
diff --git a/test/org/traccar/protocol/WialonProtocolDecoderTest.java b/test/org/traccar/protocol/WialonProtocolDecoderTest.java
index b7d2149dd..40b0469ea 100644
--- a/test/org/traccar/protocol/WialonProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WialonProtocolDecoderTest.java
@@ -23,6 +23,9 @@ public class WialonProtocolDecoderTest extends ProtocolTest {
"#P#"));
verifyPosition(decoder, text(
+ "#D#101118;061143;0756.0930;N;12338.6403;E;18.223;99.766;-4.000;10;0.800;NA;NA;NA;NA;101_521347:1:521249,101_521126:1:6593598,101_521127:1:774780,101_521072_21.1:1:0,101_521072_21.2:1:71353;F24A"));
+
+ verifyPosition(decoder, text(
"#D#151216;135910;5321.1466;N;04441.7929;E;87;156;265.000000;12;1.000000;241;NA;NA;NA;odo:2:0.000000,total_fuel:1:430087,can_fls:1:201,can_taho:1:11623,can_mileage:1:140367515"));
verifyPosition(decoder, text(