diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2008-02-17 02:57:48 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2008-02-17 02:57:48 +0000 |
commit | 257c8eea6b753f0f31978ef1a1492450ccbf97fe (patch) | |
tree | dd8ca9f211e6ac5eb9305f4cc617bfa0c52b66e4 | |
parent | ad0f807a6b08225fe91ab36accb2d56acd0458ec (diff) | |
download | gpsd-257c8eea6b753f0f31978ef1a1492450ccbf97fe.tar.gz |
Long awaited request from Hamish - higher precision log...release-2.37
...and a better metric for deciding to log the timestamp.
-rw-r--r-- | cgpxlogger.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cgpxlogger.c b/cgpxlogger.c index b85b3a86..bf2ee5c8 100644 --- a/cgpxlogger.c +++ b/cgpxlogger.c @@ -203,8 +203,8 @@ void process(struct gps_data_t *gpsdata, void write_record(struct gps_data_t *gpsdata){ track_start(); - printf(" <trkpt lat=\"%.6f\" ", gpsdata->fix.latitude ); - printf("lon=\"%.6f\">\n", gpsdata->fix.longitude ); + printf(" <trkpt lat=\"%.7f\" ", gpsdata->fix.latitude ); + printf("lon=\"%.7f\">\n", gpsdata->fix.longitude ); if ((gpsdata->status >= 2) && (gpsdata->fix.mode >= 3)){ /* dgps or pps */ @@ -233,7 +233,7 @@ void write_record(struct gps_data_t *gpsdata){ printf(" <sat>%d</sat>\n", gpsdata->satellites_used); } - if (gpsdata->satellites_used) { /* plausible timestamp */ + if (gpsdata->status >= 1) { /* plausible timestamp */ char scr[128]; printf(" <time>%s</time>\n", unix_to_iso8601(gpsdata->fix.time, scr, sizeof(scr))); |