diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-29 10:50:55 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-29 10:50:55 +1300 |
commit | e4cca2ad0dfbf3ecd60785b6974f5f16ac2f66ea (patch) | |
tree | 68d0c5e55f45067983789e11850b2ac074c4f07d /src/org | |
parent | 4610c2245dea9178ff46e7eea63b9fffd99f852d (diff) | |
parent | e134adb5f7518c6e38782166666d3de71e0a5f69 (diff) | |
download | traccar-server-e4cca2ad0dfbf3ecd60785b6974f5f16ac2f66ea.tar.gz traccar-server-e4cca2ad0dfbf3ecd60785b6974f5f16ac2f66ea.tar.bz2 traccar-server-e4cca2ad0dfbf3ecd60785b6974f5f16ac2f66ea.zip |
Merge pull request #1484 from vitalidze/master
Another version of GlobalSat protocol
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/GlobalSatProtocolDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java index 049bb2f7f..b4c64f750 100644 --- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java +++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java @@ -180,7 +180,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { .text("$") .number("(d+),") // imei .number("d+,") // mode - .number("(d),") // fix + .number("(d+),") // fix .number("(dd)(dd)(dd),") // date (ddmmyy) .number("(dd)(dd)(dd),") // time (hhmmss) .expression("([EW])") @@ -189,8 +189,8 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { .number("(dd)(dd.d+),") // latitude (ddmm.mmmm) .number("(d+.?d*),") // altitude .number("(d+.?d*),") // speed - .number("(d+.?d*),") // course - .number("(d+),") // satellites + .number("(d+.?d*)?,") // course + .number("(d+)[,*]") // satellites .number("(d+.?d*)") // hdop .compile(); @@ -209,7 +209,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder { } position.setDeviceId(getDeviceId()); - position.setValid(parser.next().equals("1")); + position.setValid(!parser.next().equals("1")); DateBuilder dateBuilder = new DateBuilder() .setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt()) |