aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
diff options
context:
space:
mode:
authorGeodelta <67260714+geodelta@users.noreply.github.com>2020-06-30 16:57:27 +0200
committerGitHub <noreply@github.com>2020-06-30 07:57:27 -0700
commita6b992410f828da7d36284a5f005617f50723b1b (patch)
tree7206665ee7bd663f50f7f774136fde6a02e85dbc /src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
parentabf47d3a6f41ae80ad4114a4d6532718bfb1af3e (diff)
downloadtrackermap-server-a6b992410f828da7d36284a5f005617f50723b1b.tar.gz
trackermap-server-a6b992410f828da7d36284a5f005617f50723b1b.tar.bz2
trackermap-server-a6b992410f828da7d36284a5f005617f50723b1b.zip
Implement Mictrack Low Altitude Flight Decoder (#4546)
* Implement Mictrack Low Altitude Flight Decoder * Fix headers * Add MictrackLowAltitudeFlightProtocolDecoderTest test for position * Merge Mictrack and Mictrack Low Altitude Flight decoders * Remove empty line * Minor style changes based on code review * Cast msg Object to String once in MictrackProtocolDecoder Co-authored-by: Roeland Boeters <roeland@geodelta.com>
Diffstat (limited to 'src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java')
-rw-r--r--src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
index 794b2b57e..605a02b92 100644
--- a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
@@ -6,7 +6,7 @@ import org.traccar.ProtocolTest;
public class MictrackProtocolDecoderTest extends ProtocolTest {
@Test
- public void testDecode() throws Exception {
+ public void testDecodeStandard() throws Exception {
MictrackProtocolDecoder decoder = new MictrackProtocolDecoder(null);
@@ -31,7 +31,22 @@ public class MictrackProtocolDecoderTest extends ProtocolTest {
verifyAttributes(decoder, text(
"MT;5;866425031379169;RH;5+190116112648+0+0+0+0+11+3954+1"));
+ }
+
+ @Test
+ public void testDecodeLowAltitude() throws Exception {
+
+ MictrackProtocolDecoder decoder = new MictrackProtocolDecoder(null);
+
+ verifyPositions(decoder, text(
+ "861108032038761$062232.00,A,2238.2832,N,11401.7381,E,0.01,309.62,95.0,131117"));
+
+ verifyPositions(decoder, text(
+ "861108032038761$062232.00,A,2238.2832,N,11401.7381,E,0.01,309.62,95.0,131117$062332.00,A,2238.2836,N,11401.7386,E,0.06,209.62,95.0,131117"));
+ verifyPositions(decoder, text(
+ "861108032038761$062232.00,A,2238.2832,N,11401.7381,E,0.01,309.62,95.0,131117"),
+ position("2017-11-13 06:22:32.000", true, 22.63806, 114.028976));
}
}