A nice addition, and useful when diagnosing baro sensor issues
Signed-off-by: Keith Packard <keithp@keithp.com>
public double ground_altitude;
public double altitude;
public double height;
public double ground_altitude;
public double altitude;
public double height;
+ public double pressure;
public double acceleration;
public double battery;
public double temperature;
public double acceleration;
public double battery;
public double temperature;
drogue_sense = data.drogue_voltage();
main_sense = data.main_voltage();
battery = data.battery_voltage();
drogue_sense = data.drogue_voltage();
main_sense = data.main_voltage();
battery = data.battery_voltage();
+ pressure = data.pressure();
tick = data.tick;
state = data.state;
tick = data.tick;
state = data.state;
-class AltosDbm extends AltosUnits {
+class AltosPressure extends AltosUnits {
- public double value(double v) {
- return v;
+ public double value(double p) {
+ return p;
}
public String show_units() {
}
public String show_units() {
}
public String say_units() {
}
public String say_units() {
}
public int show_fraction(int width) {
}
public int show_fraction(int width) {
static final private Color height_color = new Color(194,31,31);
static final private Color gps_height_color = new Color(150,31,31);
static final private Color height_color = new Color(194,31,31);
static final private Color gps_height_color = new Color(150,31,31);
+ static final private Color pressure_color = new Color (225,31,31);
static final private Color range_color = new Color(100, 31, 31);
static final private Color distance_color = new Color(100, 31, 194);
static final private Color speed_color = new Color(31,194,31);
static final private Color range_color = new Color(100, 31, 31);
static final private Color distance_color = new Color(100, 31, 194);
static final private Color speed_color = new Color(31,194,31);
static final private Color state_color = new Color(0,0,0);
static AltosVoltage voltage_units = new AltosVoltage();
static final private Color state_color = new Color(0,0,0);
static AltosVoltage voltage_units = new AltosVoltage();
+ static AltosPressure pressure_units = new AltosPressure();
static AltosNsat nsat_units = new AltosNsat();
static AltosDbm dbm_units = new AltosDbm();
AltosUIAxis height_axis, speed_axis, accel_axis, voltage_axis, temperature_axis, nsat_axis, dbm_axis;
static AltosNsat nsat_units = new AltosNsat();
static AltosDbm dbm_units = new AltosDbm();
AltosUIAxis height_axis, speed_axis, accel_axis, voltage_axis, temperature_axis, nsat_axis, dbm_axis;
- AltosUIAxis distance_axis;
+ AltosUIAxis distance_axis, pressure_axis;
public AltosGraph(AltosUIEnable enable, AltosFlightStats stats, AltosGraphDataSet dataSet) {
super(enable);
height_axis = newAxis("Height", AltosConvert.height, height_color);
public AltosGraph(AltosUIEnable enable, AltosFlightStats stats, AltosGraphDataSet dataSet) {
super(enable);
height_axis = newAxis("Height", AltosConvert.height, height_color);
+ pressure_axis = newAxis("Pressure", pressure_units, pressure_color, 0);
speed_axis = newAxis("Speed", AltosConvert.speed, speed_color);
accel_axis = newAxis("Acceleration", AltosConvert.accel, accel_color);
voltage_axis = newAxis("Voltage", voltage_units, voltage_color);
speed_axis = newAxis("Speed", AltosConvert.speed, speed_color);
accel_axis = newAxis("Acceleration", AltosConvert.accel, accel_color);
voltage_axis = newAxis("Voltage", voltage_units, voltage_color);
height_color,
true,
height_axis);
height_color,
true,
height_axis);
+ addSeries("Pressure",
+ AltosGraphDataPoint.data_pressure,
+ pressure_units,
+ pressure_color,
+ false,
+ pressure_axis);
addSeries("Speed",
AltosGraphDataPoint.data_speed,
AltosConvert.speed,
addSeries("Speed",
AltosGraphDataPoint.data_speed,
AltosConvert.speed,
public static final int data_temperature = 12;
public static final int data_range = 13;
public static final int data_distance = 14;
public static final int data_temperature = 12;
public static final int data_range = 13;
public static final int data_distance = 14;
+ public static final int data_pressure = 15;
public double x() throws AltosUIDataMissing {
if (state.data.time < -2)
public double x() throws AltosUIDataMissing {
if (state.data.time < -2)
if (state.from_pad != null)
y = state.from_pad.distance;
break;
if (state.from_pad != null)
y = state.from_pad.distance;
break;
+ case data_pressure:
+ y = state.pressure;
+ break;
}
if (y == AltosRecord.MISSING)
throw new AltosUIDataMissing(index);
}
if (y == AltosRecord.MISSING)
throw new AltosUIDataMissing(index);