summaryrefslogtreecommitdiff
path: root/altoslib/AltosGPS.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-05-19 10:09:22 -0700
committerKeith Packard <keithp@keithp.com>2015-05-19 10:09:22 -0700
commit3e5e9333420ede74d998556c1bbd5888e8ff75ae (patch)
treedbd6e450c8352e7a1005a28f5016d95769b962d0 /altoslib/AltosGPS.java
parent3fbf0a29a1b8a67b90ef965ee3e2e972c0ec33a1 (diff)
altoslib: Expose locale and non-locale floating point parsing functions
UI bits use locale-specific floating point formats, so parsing those needs to use the locale. Network-based data, like .kml bits need to use non-locale-specific parsing code, so now we've got both APIs available, and each used as appropriate. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosGPS.java')
-rw-r--r--altoslib/AltosGPS.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/altoslib/AltosGPS.java b/altoslib/AltosGPS.java
index 2139efb2..e3aee4ea 100644
--- a/altoslib/AltosGPS.java
+++ b/altoslib/AltosGPS.java
@@ -195,10 +195,10 @@ public class AltosGPS implements Cloneable, Serializable {
lon = AltosParse.parse_coord(words[i++]);
alt = AltosParse.parse_int(words[i++]);
if (version > 1 || (i < words.length && !words[i].equals("SAT"))) {
- ground_speed = AltosParse.parse_double(AltosParse.strip_suffix(words[i++], "m/s(H)"));
+ ground_speed = AltosParse.parse_double_net(AltosParse.strip_suffix(words[i++], "m/s(H)"));
course = AltosParse.parse_int(words[i++]);
- climb_rate = AltosParse.parse_double(AltosParse.strip_suffix(words[i++], "m/s(V)"));
- hdop = AltosParse.parse_double(AltosParse.strip_suffix(words[i++], "(hdop)"));
+ climb_rate = AltosParse.parse_double_net(AltosParse.strip_suffix(words[i++], "m/s(V)"));
+ hdop = AltosParse.parse_double_net(AltosParse.strip_suffix(words[i++], "(hdop)"));
h_error = AltosParse.parse_int(words[i++]);
v_error = AltosParse.parse_int(words[i++]);
}