X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosGraphUI.java;h=f59f70bab47781daf0783e747875e2ec45542152;hb=altosui-ms5611;hp=7715eeddf840274410917d644806e3e57ca25a3d;hpb=ce1b19a012a2c1c623b03efb93b881e297736718;p=fw%2Faltos diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index 7715eedd..f59f70ba 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -40,12 +40,7 @@ public class AltosGraphUI extends AltosFrame AltosGraphTime.Element speed = new AltosGraphTime.TimeSeries(String.format("Speed (%s)", AltosConvert.speed.show_units()), "Vertical Speed", green) { public void gotTimeData(double time, AltosDataPoint d) { - double speed; - if (d.state() < Altos.ao_flight_drogue && d.has_accel()) { - speed = d.accel_speed(); - } else { - speed = d.baro_speed(); - } + double speed = d.speed(); if (speed != AltosRecord.MISSING) series.add(time, AltosConvert.speed.value(speed)); } @@ -143,7 +138,8 @@ public class AltosGraphUI extends AltosFrame return graphs; } } - + + /* static private class AscentGraphs extends OverallGraphs { protected AltosGraphTime myAltosGraphTime(String suffix) { return (new AltosGraphTime("Ascent " + suffix) { @@ -158,7 +154,9 @@ public class AltosGraphUI extends AltosFrame .addElement(e_coast); } } - + */ + + /* static private class DescentGraphs extends OverallGraphs { protected AltosGraphTime myAltosGraphTime(String suffix) { return (new AltosGraphTime("Descent " + suffix) { @@ -173,13 +171,12 @@ public class AltosGraphUI extends AltosFrame // ((XYGraph)graph[8]).ymin = new Double(-50); } } + */ public AltosGraphUI(AltosRecordIterable records, String name) throws InterruptedException, IOException { super(String.format("Altos Graph %s", name)); AltosDataPointReader reader = new AltosDataPointReader (records); - if (reader == null) - return; if (reader.has_accel) init(reader, records, 0);