aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-05 07:55:25 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-12-05 07:55:25 +1300
commit6936e7aa6404419c5a9380c5e62489abcd58ce0d (patch)
treef9938acad173a5c8597b525f68eaca5eb5e46b45 /src/org/traccar/helper
parentc9232000e595b0addd4bf7bbaf7a90e088c94624 (diff)
downloadtrackermap-server-6936e7aa6404419c5a9380c5e62489abcd58ce0d.tar.gz
trackermap-server-6936e7aa6404419c5a9380c5e62489abcd58ce0d.tar.bz2
trackermap-server-6936e7aa6404419c5a9380c5e62489abcd58ce0d.zip
Implement OIGO MG protocol
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r--src/org/traccar/helper/UnitsConverter.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/helper/UnitsConverter.java b/src/org/traccar/helper/UnitsConverter.java
index 00b00861e..e0d94c6dc 100644
--- a/src/org/traccar/helper/UnitsConverter.java
+++ b/src/org/traccar/helper/UnitsConverter.java
@@ -21,6 +21,7 @@ public final class UnitsConverter {
private static final double KNOTS_TO_MPH_RATIO = 0.868976;
private static final double KNOTS_TO_MPS_RATIO = 1.94384;
private static final double KNOTS_TO_CPS_RATIO = 0.0194384449;
+ private static final double METERS_TO_FEET_RATIO = 0.3048;
private UnitsConverter() {
}
@@ -53,4 +54,12 @@ public final class UnitsConverter {
return value * KNOTS_TO_CPS_RATIO;
}
+ public static double feetFromMeters(double value) {
+ return value / METERS_TO_FEET_RATIO;
+ }
+
+ public static double metersFromFeet(double value) {
+ return value * METERS_TO_FEET_RATIO;
+ }
+
}