From: tsteven4 Date: Fri, 19 Jul 2013 02:33:57 +0000 (+0000) Subject: improve cross platform test matching by rounding instead of truncating latitude/longi... X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~502 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=aca6dbcd433b3c6f2fffdb4325a698a1b9e19e4b;p=gpsbabel.git improve cross platform test matching by rounding instead of truncating latitude/longitude. --- diff --git a/gpsbabel/bushnell.cc b/gpsbabel/bushnell.cc index d97bb7f81..a1bed6d7c 100644 --- a/gpsbabel/bushnell.cc +++ b/gpsbabel/bushnell.cc @@ -21,6 +21,7 @@ #include "defs.h" +#include #define MYNAME "Bushnell" static gbfile* file_in; @@ -235,8 +236,8 @@ bushnell_write_one(const waypoint* wpt) xasprintf(&fname, "%s-%d.wpt", ofname, wpt_count++); file_out = gbfopen_le(fname, "wb", MYNAME); - gbfputint32(wpt->latitude * 10000000, file_out); - gbfputint32(wpt->longitude * 10000000, file_out); + gbfputint32(round(wpt->latitude * 10000000), file_out); + gbfputint32(round(wpt->longitude * 10000000), file_out); gbfputc(bushnell_get_icon_from_name(wpt->icon_descr), file_out); gbfputc(0x01, file_out); // Proximity alarm. 1 == "off", 3 == armed.