From f4fa8a4e93e17f19d15ef108f6e0c81b7a83cc04 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 16 Jan 2013 15:19:51 -0800 Subject: Add GPS height to the usual plot This lets us compare the GPS height data to the barometric height data Signed-off-by: Keith Packard --- altosui/AltosGraphUI.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'altosui/AltosGraphUI.java') 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) ); -- cgit v1.2.3