diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-26 10:46:33 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 10:46:33 +1200 |
commit | 2110e12e04f9a4dadff74dd39e75e6f0226c5533 (patch) | |
tree | 4a1612968a98b21b0a48f61cafc7889736bbc259 /src | |
parent | cd011431dbae56ca9b3f4546b1485ab24bdb90af (diff) | |
parent | db427d338bbd284203badb36b25504c7f152b5ea (diff) | |
download | trackermap-server-2110e12e04f9a4dadff74dd39e75e6f0226c5533.tar.gz trackermap-server-2110e12e04f9a4dadff74dd39e75e6f0226c5533.tar.bz2 trackermap-server-2110e12e04f9a4dadff74dd39e75e6f0226c5533.zip |
Merge pull request #4067 from oliv3/bug_4064
[Gpsmta] Decode negative latitudes and longitudes
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/GpsmtaProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java index 1d80178cb..a8f74b876 100644 --- a/src/org/traccar/protocol/GpsmtaProtocolDecoder.java +++ b/src/org/traccar/protocol/GpsmtaProtocolDecoder.java @@ -36,8 +36,8 @@ public class GpsmtaProtocolDecoder extends BaseProtocolDecoder { private static final Pattern PATTERN = new PatternBuilder() .expression("([^ ]+) ") // uid .number("(d+) ") // time (unix time) - .number("(d+.d+) ") // latitude - .number("(d+.d+) ") // longitude + .number("-?(d+.d+) ") // latitude + .number("-?(d+.d+) ") // longitude .number("(d+) ") // speed .number("(d+) ") // course .number("(d+) ") // accuracy @@ -45,7 +45,7 @@ public class GpsmtaProtocolDecoder extends BaseProtocolDecoder { .number("(d+) ") // flags .number("(d+) ") // battery .number("(d+) ") // temperature - .number("(d)") // changing status + .number("(d)") // charging status .any() .compile(); |