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_height;
36 public int flight_pres;
38 static double adc(int raw) {
42 public double pressure() {
48 public double temperature() {
54 public double ground_pressure() {
55 if (ground_pres != MISSING)
60 public double battery_voltage() {
61 if (v_batt != MISSING)
62 return 3.3 * adc(v_batt) * (15.0 + 27.0) / 27.0;
66 static double pyro(int raw) {
68 return 3.3 * adc(raw) * (100.0 + 27.0) / 27.0;
72 public double main_voltage() {
76 public double apogee_voltage() {
80 public void copy (AltosRecordMini old) {
86 sense_a = old.sense_a;
87 sense_m = old.sense_m;
90 ground_pres = old.ground_pres;
92 flight_accel = old.flight_accel;
93 flight_vel = old.flight_vel;
94 flight_height = old.flight_height;
95 flight_pres = old.flight_pres;
100 public AltosRecordMini clone() {
101 return new AltosRecordMini(this);
104 void make_missing() {
112 ground_pres = MISSING;
120 public AltosRecordMini(AltosRecord old) {
125 public AltosRecordMini(AltosRecordMini old) {
129 public AltosRecordMini() {