latest calibration for test stand using 1600psi sensor
authorBdale Garbee <bdale@gag.com>
Fri, 2 Aug 2019 00:11:05 +0000 (18:11 -0600)
committerBdale Garbee <bdale@gag.com>
Sat, 28 Mar 2020 06:52:14 +0000 (00:52 -0600)
altoslib/AltosEepromRecordFireTwo.java
altosuilib/AltosGraph.java

index 165fbc1a94888ff2e42dd93aceb44e0496d70726..49a262bab0032893d126547496665428964f60f4 100644 (file)
@@ -47,17 +47,18 @@ public class AltosEepromRecordFireTwo extends AltosEepromRecord {
 
        public static double adc_to_pa(int adc) {
 
-//             /* 1600psi sensor measured 2019.04.30, these values based on that */
-//             double ADC_MIN = 405;
-//             double ADC_SLOPE = 1.95;
+               /* 1600psi sensor measured 2019.07.10, these values based on that */
+               double ADC_MIN = 405;
+               double ADC_SLOPE = 2.020;       /* adc counts per psi */
+               double ADC_OFFSET = 14.79;      /* psi at ADC_MIN */
 
-               /* 2500psi sensor measured 2019.04.30, these values based on that */
-               double ADC_MIN = 392;
-               double ADC_SLOPE = 0.46;        /* adc counts per psi */
+//             /* 2500psi sensor measured 2019.04.30, these values based on that */
+//             double ADC_MIN = 392;
+//             double ADC_SLOPE = 0.46;        /* adc counts per psi */
 
                /* sensor is asserted to be linear 0 - max psi over ADC_MIN to ADC_MAX */
                double raw = adc;
-               double psi = ((raw - ADC_MIN) / ADC_SLOPE);
+               double psi = ((raw - ADC_MIN) / ADC_SLOPE) + ADC_OFFSET;
 
                return AltosConvert.psi_to_pa(psi);
 
index c4a49d683cfa16d65b9d8ab53c720e2436ed1863..7dc336e9398dd6403186da65988518c7487ee450 100644 (file)
@@ -102,15 +102,15 @@ public class AltosGraph extends AltosUIGraph {
                AltosUIAxis     course_axis, dop_axis, tick_axis;
 
                if (stats != null && stats.serial != AltosLib.MISSING && stats.product != null && stats.flight != AltosLib.MISSING)
-                       setName(String.format("%s %d flight %d\n", stats.product, stats.serial, stats.flight));
+                       setName(String.format("%s %d test %d\n", stats.product, stats.serial, stats.flight));
 
-               height_axis = newAxis("Height", AltosConvert.height, height_color);
-               pressure_axis = newAxis("Pressure", AltosConvert.pressure, pressure_color, 0);
-               speed_axis = newAxis("Speed", AltosConvert.speed, speed_color);
+               height_axis = newAxis("Height", AltosConvert.height, height_color,0);
+               pressure_axis = newAxis("Pressure", AltosConvert.pressure, pressure_color);
+               speed_axis = newAxis("Speed", AltosConvert.speed, speed_color,0);
                thrust_axis = newAxis("Thrust", AltosConvert.force, accel_color);
                tick_axis = newAxis("Tick", tick_units, accel_color, 0);
-               accel_axis = newAxis("Acceleration", AltosConvert.accel, accel_color);
-               voltage_axis = newAxis("Voltage", AltosConvert.voltage, battery_voltage_color);
+               accel_axis = newAxis("Acceleration", AltosConvert.accel, accel_color,0);
+               voltage_axis = newAxis("Voltage", AltosConvert.voltage, battery_voltage_color,0);
                temperature_axis = newAxis("Temperature", AltosConvert.temperature, temperature_color, 0);
                nsat_axis = newAxis("Satellites", null, gps_nsat_color,
                                    AltosUIAxis.axis_include_zero | AltosUIAxis.axis_integer);
@@ -146,7 +146,7 @@ public class AltosGraph extends AltosUIGraph {
 
                flight_series.register_axis(AltosUIFlightSeries.accel_name,
                                            accel_color,
-                                           true,
+                                           false,
                                            accel_axis);
 
                flight_series.register_axis(AltosUIFlightSeries.vert_accel_name,
@@ -166,7 +166,7 @@ public class AltosGraph extends AltosUIGraph {
 
                flight_series.register_axis(AltosUIFlightSeries.speed_name,
                                            speed_color,
-                                           true,
+                                           false,
                                            speed_axis);
 
                flight_series.register_axis(AltosUIFlightSeries.kalman_speed_name,
@@ -176,12 +176,12 @@ public class AltosGraph extends AltosUIGraph {
 
                flight_series.register_axis(AltosUIFlightSeries.pressure_name,
                                            pressure_color,
-                                           false,
+                                           true,
                                            pressure_axis);
 
                flight_series.register_axis(AltosUIFlightSeries.height_name,
                                            height_color,
-                                           true,
+                                           false,
                                            height_axis);
 
                flight_series.register_axis(AltosUIFlightSeries.altitude_name,