2 * Copyright © 2012 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
18 package org.altusmetrum.altoslib_1;
20 public class AltosRecordMini extends AltosRecord {
30 public int ground_pres;
32 public int flight_accel;
33 public int flight_vel;
34 public int flight_pres;
36 static double adc(int raw) {
40 public double pressure() {
46 public double temperature() {
52 public double ground_pressure() {
53 if (ground_pres != MISSING)
58 public double battery_voltage() {
59 if (v_batt != MISSING)
60 return 3.3 * adc(v_batt) * (15.0 + 27.0) / 27.0;
64 static double pyro(int raw) {
66 return 3.3 * adc(raw) * (100.0 + 27.0) / 27.0;
70 public double main_voltage() {
74 public double apogee_voltage() {
78 public void copy (AltosRecordMini old) {
84 sense_a = old.sense_a;
85 sense_m = old.sense_m;
88 ground_pres = old.ground_pres;
90 flight_accel = old.flight_accel;
91 flight_vel = old.flight_vel;
92 flight_pres = old.flight_pres;
97 public AltosRecordMini clone() {
98 return new AltosRecordMini(this);
101 void make_missing() {
109 ground_pres = MISSING;
116 public AltosRecordMini(AltosRecord old) {
121 public AltosRecordMini(AltosRecordMini old) {
125 public AltosRecordMini() {