*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
return AltosLib.MISSING;
}
- static double tele_mini_voltage(int sensor) {
+ static double tele_mini_3_adc(int raw) {
+ return raw / 4095.0;
+ }
+
+ static public double tele_mini_3_battery_voltage(int v_batt) {
+ if (v_batt != AltosLib.MISSING)
+ return 3.3 * tele_mini_3_adc(v_batt) * (5.6 + 10.0) / 10.0;
+ return AltosLib.MISSING;
+ }
+
+ static double tele_mini_3_pyro_voltage(int raw) {
+ if (raw != AltosLib.MISSING)
+ return 3.3 * tele_mini_3_adc(raw) * (100.0 + 27.0) / 27.0;
+ return AltosLib.MISSING;
+ }
+
+ static double tele_mini_2_voltage(int sensor) {
double supply = 3.3;
return sensor / 32767.0 * supply * 127/27;