From: robertlipe Date: Wed, 17 Jul 2013 01:54:00 +0000 (+0000) Subject: Use doubles, not floats, internally for html, text, garmin_fit. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~513 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=57a241cd81458b8b886b0247aa21517212f7fb68;p=gpsbabel.git Use doubles, not floats, internally for html, text, garmin_fit. --- diff --git a/gpsbabel/garmin_fit.cc b/gpsbabel/garmin_fit.cc index 415d51059..14bc02baa 100644 --- a/gpsbabel/garmin_fit.cc +++ b/gpsbabel/garmin_fit.cc @@ -371,8 +371,8 @@ fit_parse_data(fit_message_def* def, int time_offset) } waypt = waypt_new(); - waypt->latitude = (lat / (float)0x7fffffff) * 180; - waypt->longitude = (lon / (float)0x7fffffff) * 180; + waypt->latitude = (lat / (double)0x7fffffff) * 180; + waypt->longitude = (lon / (double)0x7fffffff) * 180; if (alt != 0xffff) { waypt->altitude = (alt / 5.0) - 500; } diff --git a/gpsbabel/html.cc b/gpsbabel/html.cc index bf039787b..3459b17b7 100644 --- a/gpsbabel/html.cc +++ b/gpsbabel/html.cc @@ -200,8 +200,8 @@ html_disp(const waypoint* wpt) logpart = xml_findfirst(curlog, "groundspeak:log_wpt"); if (logpart) { char* coordstr = NULL; - float lat = 0; - float lon = 0; + double lat = 0; + double lon = 0; coordstr = xml_attribute(logpart, "lat"); if (coordstr) { lat = atof(coordstr); diff --git a/gpsbabel/text.cc b/gpsbabel/text.cc index d05948899..a71baa38c 100644 --- a/gpsbabel/text.cc +++ b/gpsbabel/text.cc @@ -217,8 +217,8 @@ text_disp(const waypoint *wpt) logpart = xml_findfirst(curlog, "groundspeak:log_wpt"); if (logpart) { char *coordstr = NULL; - float lat = 0; - float lon = 0; + double lat = 0; + double lon = 0; coordstr = xml_attribute(logpart, "lat"); if (coordstr) { lat = atof(coordstr);