From 3e5e9333420ede74d998556c1bbd5888e8ff75ae Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 May 2015 10:09:22 -0700 Subject: 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 --- altoslib/AltosGPS.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'altoslib/AltosGPS.java') 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++]); } -- cgit v1.2.3