diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-05 09:22:58 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-05 09:22:58 -0800 |
commit | 0443367a581100b4f9abd3d96a50793d80c93e45 (patch) | |
tree | bc5c6e8b5885e6c82ba36626aff6a73ce2753d96 | |
parent | 7f1e024bca381f93cf1d9e61dadc3bb2f4943da7 (diff) | |
download | trackermap-server-0443367a581100b4f9abd3d96a50793d80c93e45.tar.gz trackermap-server-0443367a581100b4f9abd3d96a50793d80c93e45.tar.bz2 trackermap-server-0443367a581100b4f9abd3d96a50793d80c93e45.zip |
Fix coordinates decoding (fix #4496)
-rw-r--r-- | src/main/java/org/traccar/protocol/TelicProtocolDecoder.java | 6 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/TelicProtocolDecoder.java b/src/main/java/org/traccar/protocol/TelicProtocolDecoder.java index 457687b2e..efe155a88 100644 --- a/src/main/java/org/traccar/protocol/TelicProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TelicProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 - 2019 Anton Tananaev (anton@traccar.org) + * Copyright 2014 - 2020 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,8 +42,8 @@ public class TelicProtocolDecoder extends BaseProtocolDecoder { .number("(dd)(dd)(dd)") // date (ddmmyy) .number("(dd)(dd)(dd),") // time (hhmmss) .groupBegin() - .number("(-?d{9}),") // longitude - .number("(-?d{8}),") // latitude + .number("(-?d{7,}),") // longitude + .number("(-?d{6,}),") // latitude .or() .number("(-?d+),") // longitude .number("(-?d+),") // latitude diff --git a/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java index b743cef96..7616e7e8d 100644 --- a/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java @@ -14,6 +14,9 @@ public class TelicProtocolDecoderTest extends ProtocolTest { "0026355565071347499|206|01|001002008")); verifyPosition(decoder, text( + "023035467909228696525,280220174140,0,280220174135,-80333933,25796530,3,1,0,5,3,3,-21,319064,26202,0000,00,0,206,0,0407,0,0,18,0,3,0")); + + verifyPosition(decoder, text( "052028495198,160917073641,0,160917073642,43879,511958,3,24,223,17,,,-3,142379,,0010,00,64,205,0,0499")); verifyPosition(decoder, text( |