summaryrefslogtreecommitdiff
path: root/altosui
diff options
context:
space:
mode:
Diffstat (limited to 'altosui')
-rw-r--r--altosui/AltosDataPoint.java1
-rw-r--r--altosui/AltosDataPointReader.java1
-rw-r--r--altosui/AltosGraphTime.java5
-rw-r--r--altosui/AltosGraphUI.java10
4 files changed, 15 insertions, 2 deletions
diff --git a/altosui/AltosDataPoint.java b/altosui/AltosDataPoint.java
index 4956e9f3..f3408cb2 100644
--- a/altosui/AltosDataPoint.java
+++ b/altosui/AltosDataPoint.java
@@ -17,6 +17,7 @@ interface AltosDataPoint {
double acceleration();
double height();
+ double gps_height();
double speed();
double temperature();
double battery_voltage();
diff --git a/altosui/AltosDataPointReader.java b/altosui/AltosDataPointReader.java
index 88df081f..6e6e474e 100644
--- a/altosui/AltosDataPointReader.java
+++ b/altosui/AltosDataPointReader.java
@@ -48,6 +48,7 @@ class AltosDataPointReader implements Iterable<AltosDataPoint> {
public double acceleration() { return state.acceleration; }
public double height() { return state.height; }
+ public double gps_height() { return state.gps_height; }
public double speed() { return state.speed(); }
public double temperature() { return state.temperature; }
public double battery_voltage() { return state.battery; }
diff --git a/altosui/AltosGraphTime.java b/altosui/AltosGraphTime.java
index 62d516b2..935d59de 100644
--- a/altosui/AltosGraphTime.java
+++ b/altosui/AltosGraphTime.java
@@ -99,9 +99,10 @@ class AltosGraphTime extends AltosGraph {
int dataNum = g.getDataNum(this);
int axisNum = g.getAxisNum(this);
- plot.setDataset(dataNum, dataset);
+ plot.setDataset(dataNum, dataset);
plot.mapDatasetToRangeAxis(dataNum, axisNum);
- plot.setRenderer(dataNum, renderer);
+ plot.setRenderer(dataNum, renderer);
+// renderer.setSeriesVisible(0, false);
}
}
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) );