From d47077f3f089dfb90929c7a90d1ed39ab8e94098 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Mon, 28 Mar 2016 20:29:03 -0700 Subject: use more precision when outputting lat/lon. A cm level GPS needs decimal degrees to 0.0000001 --- libgps_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgps_core.c') diff --git a/libgps_core.c b/libgps_core.c index 434ebcf1..582e2105 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -293,8 +293,9 @@ void libgps_dump_state(struct gps_data_t *collect) (void)fprintf(debugfp, "ONLINE: %lf\n", collect->online); if (collect->set & TIME_SET) (void)fprintf(debugfp, "TIME: %lf\n", collect->fix.time); + /* NOTE: %.7f needed for cm level accurate GPS */ if (collect->set & LATLON_SET) - (void)fprintf(debugfp, "LATLON: lat/lon: %lf %lf\n", + (void)fprintf(debugfp, "LATLON: lat/lon: %.7lf %.7lf\n", collect->fix.latitude, collect->fix.longitude); if (collect->set & ALTITUDE_SET) (void)fprintf(debugfp, "ALTITUDE: altitude: %lf U: climb: %lf\n", -- cgit v1.2.1