summaryrefslogtreecommitdiff
path: root/gpxlogger.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2016-01-29 12:50:35 -0500
committerEric S. Raymond <esr@thyrsus.com>2016-01-29 12:50:35 -0500
commitefaf1007787d5a597be0926e2a694a4867af953a (patch)
treeaabc8b72c35f64b94c3e354fe276fcd46cf8c863 /gpxlogger.c
parentcfad4675e188afc0cb4c7841b688bda81a2f7e7e (diff)
downloadgpsd-efaf1007787d5a597be0926e2a694a4867af953a.tar.gz
By popular demand, restore STATUS_DGPS_FIX to public interface.
Diffstat (limited to 'gpxlogger.c')
-rw-r--r--gpxlogger.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/gpxlogger.c b/gpxlogger.c
index c442587f..2d1decb8 100644
--- a/gpxlogger.c
+++ b/gpxlogger.c
@@ -87,20 +87,23 @@ static void print_fix(struct gps_data_t *gpsdata, double time)
(void)fprintf(logfile," <ele>%f</ele>\n", gpsdata->fix.altitude);
(void)fprintf(logfile," <time>%s</time>\n",
unix_to_iso8601(time, tbuf, sizeof(tbuf)));
- switch (gpsdata->fix.mode) {
- case MODE_3D:
- (void)fprintf(logfile," <fix>3d</fix>\n");
- break;
- case MODE_2D:
- (void)fprintf(logfile," <fix>2d</fix>\n");
- break;
- case MODE_NO_FIX:
- (void)fprintf(logfile," <fix>none</fix>\n");
- break;
- default:
- /* don't print anything if no fix indicator */
- break;
- }
+ if (gpsdata->status == STATUS_DGPS_FIX)
+ (void)fprintf(logfile," <fix>dgps</fix>\n");
+ else
+ switch (gpsdata->fix.mode) {
+ case MODE_3D:
+ (void)fprintf(logfile," <fix>3d</fix>\n");
+ break;
+ case MODE_2D:
+ (void)fprintf(logfile," <fix>2d</fix>\n");
+ break;
+ case MODE_NO_FIX:
+ (void)fprintf(logfile," <fix>none</fix>\n");
+ break;
+ default:
+ /* don't print anything if no fix indicator */
+ break;
+ }
if ((gpsdata->fix.mode > MODE_NO_FIX) && (gpsdata->satellites_used > 0))
(void)fprintf(logfile," <sat>%d</sat>\n", gpsdata->satellites_used);