private static final double r_below = 10000.0;
private static final double v_adc = 3.3;
- private static double
- firetwo_adc(int raw) {
+ private static double firetwo_adc(int raw) {
return raw / 4095.0;
}
- private static double
- adc_to_pa(int adc) {
+ public static double adc_to_pa(int adc) {
/* raw adc to processor voltage, then back through the
* voltage divider to the sensor voltage
return AltosConvert.psi_to_pa(psi);
}
+ public static double adc_to_n(int adc) {
+ double v = firetwo_adc(adc);
+
+ /* this is a total guess */
+ return AltosConvert.lb_to_n(v * 298 * 9.807);
+ }
+
public void update_state(AltosState state) {
super.update_state(state);