From: Dr. Johann Pfefferl Date: Tue, 25 May 2010 10:37:42 +0000 (+0200) Subject: Also log the fix to the file X-Git-Tag: release-1.0-2~1 X-Git-Url: https://vcs.maemo.org/git/?p=gps-tracker;a=commitdiff_plain;h=07a5a42612aa686f10bd92aca069c80c56a08b25 Also log the fix to the file --- diff --git a/gps-tracker.c b/gps-tracker.c index 5974b3d..b02ee96 100644 --- a/gps-tracker.c +++ b/gps-tracker.c @@ -141,6 +141,13 @@ on_gps_device_changed (LocationGPSDevice *device, gpointer data) g_fprintf(fp, "\n", st); } } + if(fp) { + if(device->fix->mode == LOCATION_GPS_DEVICE_MODE_2D) + g_fprintf(fp, "2d\n"); + else if(device->fix->mode == LOCATION_GPS_DEVICE_MODE_3D) + g_fprintf(fp, "3d\n"); + g_fprintf(fp, "sat>%d\n", device->satellites_in_use); + } if (device->fix->fields & LOCATION_GPS_DEVICE_ALTITUDE_SET) { //g_print ("alt = %f\n", device->fix->altitude); @@ -179,7 +186,9 @@ on_gps_device_changed (LocationGPSDevice *device, gpointer data) // device->fix->eps, // device->fix->epc); if(fp) { - g_fprintf(fp, "%.1f\n%.1f\n", device->fix->eph / 100.0, device->fix->epv); + g_fprintf(fp, "%s\n%s\n", + g_ascii_formatd(sbuf1, sizeof(sbuf1), "%.1f", device->fix->eph / 100.0), + g_ascii_formatd(sbuf2, sizeof(sbuf2), "%.1f", device->fix->epv)); g_fprintf(fp, "\n"); } }