diff options
author | Gary E. Miller <gem@rellim.com> | 2016-03-28 20:29:03 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-03-28 20:29:03 -0700 |
commit | d47077f3f089dfb90929c7a90d1ed39ab8e94098 (patch) | |
tree | cff48ce27d073e1794024997b6b513ed38c1e308 /libgps_core.c | |
parent | d2a94a143b380a6a4155931878b105b10a8a701b (diff) | |
download | gpsd-d47077f3f089dfb90929c7a90d1ed39ab8e94098.tar.gz |
use more precision when outputting lat/lon.
A cm level GPS needs decimal degrees to 0.0000001
Diffstat (limited to 'libgps_core.c')
-rw-r--r-- | libgps_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
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", |