elide reference to GPS since we don't have it
[fw/altos] / teststand / AltosGraphUI.java
index 6cad982c8d2d0744a3bf948be8a5e776bea8cb6c..7f1a4c2baeef777a5f8a2dee583d721ea43939c8 100644 (file)
@@ -34,50 +34,17 @@ import org.jfree.ui.RefineryUtilities;
 public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, AltosUnitsListener, AltosFilterListener
 {
        JTabbedPane             pane;
-       AltosGraph              graph;
+       TestStandGraph          graph;
        AltosUIEnable           enable;
-       AltosUIMap              map;
-       AltosFlightStats        stats;
-       AltosFlightStatsTable   statsTable;
-       AltosGPS                gps;
-       boolean                 has_gps;
-
-       void fill_map(AltosFlightSeries flight_series) {
-               boolean                 any_gps = false;
-               AltosGPSTimeValue       gtv_last = null;
-
-               if (flight_series.gps_series != null) {
-                       for (AltosGPSTimeValue gtv : flight_series.gps_series) {
-                               AltosGPS gps = gtv.gps;
-                               if (gps != null &&
-                                   gps.locked &&
-                                   gps.nsat >= 4) {
-                                       if (map == null)
-                                               map = new AltosUIMap();
-                                       map.show(gps, (int) flight_series.value_before(AltosFlightSeries.state_name, gtv.time));
-                                       this.gps = gps;
-                                       gtv_last = gtv;
-                                       has_gps = true;
-                               }
-                       }
-               }
-               if (gtv_last != null) {
-                       int state = (int) flight_series.value_after(AltosFlightSeries.state_name, gtv_last.time);
-                       if (state == AltosLib.ao_flight_landed)
-                               map.show(gtv_last.gps, state);
-               }
-       }
+       TestStats       stats;
+       TestStatsTable          statsTable;
 
        public void font_size_changed(int font_size) {
-               if (map != null)
-                       map.font_size_changed(font_size);
                if (statsTable != null)
                        statsTable.font_size_changed(font_size);
        }
 
        public void units_changed(boolean imperial_units) {
-               if (map != null)
-                       map.units_changed(imperial_units);
                if (enable != null)
                        enable.units_changed(imperial_units);
        }
@@ -87,7 +54,7 @@ public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, Alt
        public void filter_changed(double speed_filter, double accel_filter) {
                flight_series.set_filter(speed_filter, accel_filter);
                graph.filter_changed();
-               stats = new AltosFlightStats(flight_series);
+               stats = new TestStats(flight_series);
                statsTable.filter_changed(stats);
        }
 
@@ -114,20 +81,15 @@ public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, Alt
 
                flight_series.finish();
 
-               stats = new AltosFlightStats(flight_series);
+               stats = new TestStats(flight_series);
 
-               graph = new AltosGraph(enable, stats, flight_series);
+               graph = new TestStandGraph(enable, stats, flight_series);
 
-               statsTable = new AltosFlightStatsTable(stats);
+               statsTable = new TestStatsTable(stats);
 
-               pane.add("Flight Graph", graph.panel);
+               pane.add("Test Graph", graph.panel);
                pane.add("Configure Graph", enable);
-               pane.add("Flight Statistics", statsTable);
-
-               has_gps = false;
-               fill_map(flight_series);
-               if (has_gps)
-                       pane.add("Map", map);
+               pane.add("Test Statistics", statsTable);
 
                setContentPane (pane);
 
@@ -144,7 +106,5 @@ public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, Alt
                pack();
 
                setVisible(true);
-               if (gps != null)
-                       map.centre(gps);
        }
 }