diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-05-07 19:34:43 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-05-07 19:34:43 +0000 |
commit | f7237eb923b205bc13f1e54533a5205b4dcac9b2 (patch) | |
tree | 8b5a15776d83ea07fe486712058a4fb436f20e79 /xgps.c | |
parent | e5e83c11aeca59ca952eaf45bcccb76e0adeaec8 (diff) | |
download | gpsd-f7237eb923b205bc13f1e54533a5205b4dcac9b2.tar.gz |
Stop losing precision due to float conversion.
Diffstat (limited to 'xgps.c')
-rw-r--r-- | xgps.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -272,12 +272,12 @@ static void update_panel(struct gps_data_t *gpsdata, char *message) strcpy(s, "n/a"); XmTextFieldSetString(text_1, s); if (gpsdata->fix.mode >= MODE_2D) - sprintf(s, "%f %c", fabsf(gpsdata->fix.latitude), (gpsdata->fix.latitude < 0) ? 'S' : 'N'); + sprintf(s, "%lf %c", fabs(gpsdata->fix.latitude), (gpsdata->fix.latitude < 0) ? 'S' : 'N'); else strcpy(s, "n/a"); XmTextFieldSetString(text_2, s); if (gpsdata->fix.mode >= MODE_2D) - sprintf(s, "%f %c", fabsf(gpsdata->fix.longitude), (gpsdata->fix.longitude < 0) ? 'W' : 'E'); + sprintf(s, "%lf %c", fabs(gpsdata->fix.longitude), (gpsdata->fix.longitude < 0) ? 'W' : 'E'); else strcpy(s, "n/a"); XmTextFieldSetString(text_3, s); |