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);
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);
flight_series.register_axis(AltosUIFlightSeries.accel_name,
accel_color,
- true,
+ false,
accel_axis);
flight_series.register_axis(AltosUIFlightSeries.vert_accel_name,
flight_series.register_axis(AltosUIFlightSeries.speed_name,
speed_color,
- true,
+ false,
speed_axis);
flight_series.register_axis(AltosUIFlightSeries.kalman_speed_name,
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,