summaryrefslogtreecommitdiff
path: root/altosui/AltosGraphUI.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-01-16 15:19:51 -0800
committerKeith Packard <keithp@keithp.com>2013-01-18 23:00:20 -0800
commitf4fa8a4e93e17f19d15ef108f6e0c81b7a83cc04 (patch)
treeda1260cc55400f0a244efe59cfd7d83d0a63a6a2 /altosui/AltosGraphUI.java
parent4646beb421ab5bec612dfe5e3c57e790b1f41203 (diff)
Add GPS height to the usual plotplot-gps-height
This lets us compare the GPS height data to the barometric height data Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosGraphUI.java')
-rw-r--r--altosui/AltosGraphUI.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java
index d6891ffa..43cfb27b 100644
--- a/altosui/AltosGraphUI.java
+++ b/altosui/AltosGraphUI.java
@@ -38,6 +38,15 @@ public class AltosGraphUI extends AltosUIFrame
}
};
+ AltosGraphTime.Element gps_height =
+ new AltosGraphTime.TimeSeries("Height", AltosConvert.height.show_units(), "GPS Height (AGL)", magenta) {
+ public void gotTimeData(double time, AltosDataPoint d) {
+ double height = d.gps_height();
+ if (height != AltosRecord.MISSING)
+ series.add(time, AltosConvert.height.value(height));
+ }
+ };
+
AltosGraphTime.Element speed =
new AltosGraphTime.TimeSeries("Speed", AltosConvert.speed.show_units(), "Vertical Speed", green) {
public void gotTimeData(double time, AltosDataPoint d) {
@@ -113,6 +122,7 @@ public class AltosGraphUI extends AltosUIFrame
graphs.add( myAltosGraphTime("Summary")
.addElement(height)
+ .addElement(gps_height)
.addElement(speed)
.addElement(acceleration) );