summaryrefslogtreecommitdiff
path: root/cgps.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2005-08-19 05:48:28 +0000
committerGary E. Miller <gem@rellim.com>2005-08-19 05:48:28 +0000
commitcf94c059381e76e00134696991b6aa0d04e01339 (patch)
tree6ca1de60677610d7ba18b1df019a80d0e9b937e6 /cgps.c
parenta5f12a958510a08165a8ca38c76eb6b19ad60e6f (diff)
downloadgpsd-cf94c059381e76e00134696991b6aa0d04e01339.tar.gz
GPSD_UNITS now sets proper units in cgps.
Diffstat (limited to 'cgps.c')
-rw-r--r--cgps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cgps.c b/cgps.c
index 772407c6..8a45404f 100644
--- a/cgps.c
+++ b/cgps.c
@@ -186,7 +186,7 @@ static void update_panel(struct gps_data_t *gpsdata,
/* Fill in the estimated horizontal position error. */
if (isnan(gpsdata->fix.eph)==0) {
(void)move(6,17);
- (void)printw("%d ft ", (int) (gpsdata->fix.eph * altfactor));
+ (void)printw("%d %s ", (int) (gpsdata->fix.eph * altfactor), altunits);
} else {
(void)move(6,17);
(void)printw("n/a ");
@@ -195,17 +195,17 @@ static void update_panel(struct gps_data_t *gpsdata,
/* Fill in the estimated vertical position error. */
if (isnan(gpsdata->fix.epv)==0) {
(void)move(7,17);
- (void)printw("%d ft ", (int)(gpsdata->fix.epv * altfactor));
+ (void)printw("%d %s ", (int)(gpsdata->fix.epv * altfactor), altunits);
} else {
(void)move(7,17);
(void)printw("n/a ");
}
/* Fill in the rate of climb. */
- /* TODO: Factor are probably wrong. */
if (gpsdata->fix.mode == MODE_3D && isnan(gpsdata->fix.climb)==0) {
(void)move(8,17);
- (void)printw("%.1f ft/min ", gpsdata->fix.climb * METERS_TO_FEET * 60);
+ (void)printw("%.1f %s/min "
+ , gpsdata->fix.climb * altfactor * 60, altunits);
} else {
(void)move(8,17);
(void)printw("n/a ");