diff options
author | Keith Packard <keithp@keithp.com> | 2010-09-05 01:03:18 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-09-05 01:03:18 -0700 |
commit | 3d99584fcfe43b22e8581874e0ac77ce3d635d48 (patch) | |
tree | 6db6954d1fbcea79dc709d378e9511deaceae15b | |
parent | 2d58f319a7c1a6a8ccc6a539722009996ba886ab (diff) |
altosui: Add elevation and range data to main display
Reported by voice, it's useful to see these on the display as well.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | ao-tools/altosui/AltosUI.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ao-tools/altosui/AltosUI.java b/ao-tools/altosui/AltosUI.java index 37625e8e..6a1814ff 100644 --- a/ao-tools/altosui/AltosUI.java +++ b/ao-tools/altosui/AltosUI.java @@ -231,11 +231,19 @@ public class AltosUI extends JFrame { if (state.npad > 0) { if (state.from_pad != null) { - info_add_row(1, "Distance from pad", "%6.0f m", state.from_pad.distance); - info_add_row(1, "Direction from pad", "%6.0f°", state.from_pad.bearing); + info_add_row(1, "Distance from pad", "%6d m", + (int) (state.from_pad.distance + 0.5)); + info_add_row(1, "Direction from pad", "%6d°", + (int) (state.from_pad.bearing + 0.5)); + info_add_row(1, "Elevation from pad", "%6d°", + (int) (state.elevation + 0.5)); + info_add_row(1, "Range from pad", "%6d m", + (int) (state.range + 0.5)); } else { info_add_row(1, "Distance from pad", "unknown"); info_add_row(1, "Direction from pad", "unknown"); + info_add_row(1, "Elevation from pad", "unknown"); + info_add_row(1, "Range from pad", "unknown"); } info_add_deg(1, "Pad latitude", state.pad_lat, 'N', 'S'); info_add_deg(1, "Pad longitude", state.pad_lon, 'E', 'W'); |