aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r--src/org/traccar/helper/Parser.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/org/traccar/helper/Parser.java b/src/org/traccar/helper/Parser.java
index ef972600b..7c15c0323 100644
--- a/src/org/traccar/helper/Parser.java
+++ b/src/org/traccar/helper/Parser.java
@@ -38,10 +38,14 @@ public class Parser {
}
public boolean hasNext() {
+ return hasNext(1);
+ }
+
+ public boolean hasNext(int number) {
if (matcher.group(position) != null) {
return true;
} else {
- position++;
+ position += number;
return false;
}
}
@@ -80,6 +84,7 @@ public class Parser {
public enum CoordinateFormat {
DEG_MIN_HEM,
+ DEG_MIN_MIN_HEM,
HEM_DEG,
HEM_DEG_MIN,
HEM_DEG_MIN_HEM
@@ -90,6 +95,11 @@ public class Parser {
String hemisphere;
switch (format) {
+ case DEG_MIN_MIN_HEM:
+ coordinate = nextInt();
+ coordinate += (nextInt() + nextInt() / 1000.0) / 60;
+ hemisphere = next();
+ break;
case HEM_DEG:
hemisphere = next();
coordinate = nextDouble();