Re: [Gpsbabel-code] Precision loss
Brought to you by:
robertl
From: Robert L. <rob...@us...> - 2003-11-24 14:14:04
|
Rick Richardson wrote: > But look at what we get with the default output: The default was really meant to be read by humans, so it's not the tightest stuff around. > printposn() in util.c should probably take a double arg, no? Yes, it probably should. [ pauses. considers printf specifier, fabs usages. ] I think it really is this easy. If I'm wrong, let me know. I've committed this. RJL Index: defs.h =================================================================== RCS file: /cvsroot/gpsbabel/gpsbabel/defs.h,v retrieving revision 1.65 diff -p -u -r1.65 defs.h --- defs.h 16 Nov 2003 20:10:38 -0000 1.65 +++ defs.h 24 Nov 2003 14:13:01 -0000 @@ -293,7 +293,7 @@ void warning(const char *, ...) ff_vecs_t *find_vec(char *, char **); void disp_vecs(void); void disp_formats(int version); -void printposn(float c, int is_lat); +void printposn(double c, int is_lat); filter_vecs_t * find_filter_vec(char *, char **); void free_filter_vec(filter_vecs_t *); Index: util.c =================================================================== RCS file: /cvsroot/gpsbabel/gpsbabel/util.c,v retrieving revision 1.38 diff -p -u -r1.38 util.c --- util.c 13 Nov 2003 05:28:33 -0000 1.38 +++ util.c 24 Nov 2003 14:13:01 -0000 @@ -279,7 +279,7 @@ mkposn(const char *string) } void -printposn(const float c, int is_lat) +printposn(const double c, int is_lat) { char d; if (is_lat) { |