aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 13:20:46 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-04 13:20:46 +1300
commitd4dbf85d9536bfec85252a58fc552e2bad42ff17 (patch)
tree4a849426c2cd60538b152138b147abef47b40966 /src/org/traccar/protocol/GlobalSatProtocolDecoder.java
parent9218bc65b9673b24d2866aae3d5bbe1a5388bab0 (diff)
downloadtrackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.gz
trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.tar.bz2
trackermap-server-d4dbf85d9536bfec85252a58fc552e2bad42ff17.zip
Remove trailing whitespaces from code
Diffstat (limited to 'src/org/traccar/protocol/GlobalSatProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index 2b36d7a9e..e652d932b 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -16,7 +16,7 @@
package org.traccar.protocol;
import java.net.SocketAddress;
-import java.util.Calendar;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -34,7 +34,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
public GlobalSatProtocolDecoder(GlobalSatProtocol protocol) {
super(protocol);
-
+
format0 = Context.getConfig().getString(getProtocolName() + ".format0", "TSPRXAB27GHKLMnaicz*U!");
format1 = Context.getConfig().getString(getProtocolName() + ".format1", "SARY*U!");
}
@@ -169,7 +169,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
}
return position;
}
-
+
private static final Pattern pattern = Pattern.compile(
"\\$" +
"(\\d+)," + // IMEI
@@ -186,7 +186,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
"(\\d+\\.?\\d*)," + // Course
"(\\d+)," + // Satellites
"(\\d+\\.?\\d*)"); // HDOP
-
+
private Position decodeAlternative(Channel channel, String sentence) {
// Parse message
@@ -208,7 +208,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
// Validity
position.setValid(parser.group(index++).compareTo("1") != 0);
-
+
// Time
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
time.clear();
@@ -257,13 +257,13 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
throws Exception {
String sentence = (String) msg;
-
+
if (sentence.startsWith("GS")) {
return decodeOriginal(channel, sentence);
} else if (sentence.startsWith("$")) {
return decodeAlternative(channel, sentence);
}
-
+
return null;
}