altoslib: Add TeleMini v3 support
authorKeith Packard <keithp@keithp.com>
Mon, 20 Feb 2017 01:36:04 +0000 (17:36 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 20 Feb 2017 19:16:53 +0000 (11:16 -0800)
eeprom, telemetry and monitor idle. This is just like TeleMini v2,
except the ADC ranges are all difference as the voltage dividers are
different and the ADC itself has a different range.

Signed-off-by: Keith Packard <keithp@keithp.com>
15 files changed:
altoslib/AltosConvert.java
altoslib/AltosEepromChunk.java
altoslib/AltosEepromFile.java
altoslib/AltosEepromMini.java
altoslib/AltosIdleFetch.java
altoslib/AltosLib.java
altoslib/AltosSensorTMini.java [deleted file]
altoslib/AltosSensorTMini2.java [new file with mode: 0644]
altoslib/AltosSensorTMini3.java [new file with mode: 0644]
altoslib/AltosTelemetry.java
altoslib/AltosTelemetryMini.java [deleted file]
altoslib/AltosTelemetryMini2.java [new file with mode: 0644]
altoslib/AltosTelemetryMini3.java [new file with mode: 0644]
altoslib/AltosTelemetryStandard.java
altoslib/Makefile.am

index 288f43ce47857a3af002f0298270be13d2a6c7e5..0b41328739d1797ab4c6491cbfe4fe198f667867 100644 (file)
@@ -219,7 +219,23 @@ public class AltosConvert {
                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;
index c9598254e34dbe34e0ef98f3a4e0f449d446d4b3..36b5961bf36a786fe8ca784f4a65145309d724d3 100644 (file)
@@ -82,7 +82,8 @@ public class AltosEepromChunk {
                case AltosLib.AO_LOG_FORMAT_TELEMETRUM:
                        eeprom = new AltosEepromMetrum2(this, offset);
                        break;
-               case AltosLib.AO_LOG_FORMAT_TELEMINI:
+               case AltosLib.AO_LOG_FORMAT_TELEMINI2:
+               case AltosLib.AO_LOG_FORMAT_TELEMINI3:
                case AltosLib.AO_LOG_FORMAT_EASYMINI:
                        eeprom = new AltosEepromMini(this, offset);
                        break;
index 957c826a019098ec17bdce98be1ffb5b6cd1d052..baeec730ac509d1b6889ac0ffb5234d87eef84ef 100644 (file)
@@ -101,7 +101,8 @@ public class AltosEepromFile extends AltosStateIterable {
                case AltosLib.AO_LOG_FORMAT_TELEMETRUM:
                        body = new AltosEepromIterable(AltosEepromMetrum2.read(input));
                        break;
-               case AltosLib.AO_LOG_FORMAT_TELEMINI:
+               case AltosLib.AO_LOG_FORMAT_TELEMINI2:
+               case AltosLib.AO_LOG_FORMAT_TELEMINI3:
                case AltosLib.AO_LOG_FORMAT_EASYMINI:
                        body = new AltosEepromIterable(AltosEepromMini.read(input));
                        break;
index dc51e591de71c626ea371422769742d76e370f6d..04155071fbd0767f143788cf91a5ef94754e8167 100644 (file)
@@ -42,11 +42,24 @@ public class AltosEepromMini extends AltosEeprom {
        public int sense_m() { return data16(8); }
        public int v_batt() { return data16(10); }
 
-       double voltage(AltosState state, int sensor) {
+       private double battery_voltage(AltosState state, int sensor) {
                if (state.log_format == AltosLib.AO_LOG_FORMAT_EASYMINI)
                        return AltosConvert.easy_mini_voltage(sensor, state.serial);
-               else
-                       return AltosConvert.tele_mini_voltage(sensor);
+               if (state.log_format == AltosLib.AO_LOG_FORMAT_TELEMINI2)
+                       return AltosConvert.tele_mini_2_voltage(sensor);
+               if (state.log_format == AltosLib.AO_LOG_FORMAT_TELEMINI3)
+                       return AltosConvert.tele_mini_3_battery_voltage(sensor);
+               return -1;
+       }
+
+       private double pyro_voltage(AltosState state, int sensor) {
+               if (state.log_format == AltosLib.AO_LOG_FORMAT_EASYMINI)
+                       return AltosConvert.easy_mini_voltage(sensor, state.serial);
+               if (state.log_format == AltosLib.AO_LOG_FORMAT_TELEMINI2)
+                       return AltosConvert.tele_mini_2_voltage(sensor);
+               if (state.log_format == AltosLib.AO_LOG_FORMAT_TELEMINI3)
+                       return AltosConvert.tele_mini_3_pyro_voltage(sensor);
+               return -1;
        }
 
        public void update_state(AltosState state) {
@@ -62,9 +75,9 @@ public class AltosEepromMini extends AltosEeprom {
                        break;
                case AltosLib.AO_LOG_SENSOR:
                        state.set_ms5607(pres(), temp());
-                       state.set_apogee_voltage(voltage(state, sense_a()));
-                       state.set_main_voltage(voltage(state, sense_m()));
-                       state.set_battery_voltage(voltage(state, v_batt()));
+                       state.set_apogee_voltage(pyro_voltage(state, sense_a()));
+                       state.set_main_voltage(pyro_voltage(state, sense_m()));
+                       state.set_battery_voltage(battery_voltage(state, v_batt()));
                        break;
                }
        }
index 8871e9cc1089d6c3aab624052962efa302a3f852..5c6f57e049cd4a56e43f625f237aae957e42fef7 100644 (file)
@@ -38,8 +38,9 @@ class AltosIdler {
        static final int        idle_sensor_metrum = 11;
        static final int        idle_sensor_mega = 12;
        static final int        idle_sensor_emini = 13;
-       static final int        idle_sensor_tmini = 14;
+       static final int        idle_sensor_tmini2 = 14;
        static final int        idle_sensor_tgps = 15;
+       static final int        idle_sensor_tmini3 = 16;
 
        public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException, TimeoutException, AltosUnknownProduct {
                for (int idler : idlers) {
@@ -72,12 +73,15 @@ class AltosIdler {
                        case idle_sensor_emini:
                                AltosSensorEMini.update_state(state, link, config_data);
                                break;
-                       case idle_sensor_tmini:
+                       case idle_sensor_tmini2:
                                AltosSensorTMini.update_state(state, link, config_data);
                                break;
                        case idle_sensor_tgps:
                                AltosSensorTGPS.update_state(state, link, config_data);
                                break;
+                       case idle_sensor_tmini3:
+                               AltosSensorTMini3.update_state(state, link, config_data);
+                               break;
                        }
                        if (idle != null)
                                idle.update_state(state);
@@ -108,7 +112,11 @@ public class AltosIdleFetch implements AltosStateUpdate {
 
                new AltosIdler("TeleMini-v2",
                               AltosIdler.idle_ms5607,
-                              AltosIdler.idle_sensor_tmini),
+                              AltosIdler.idle_sensor_tmini2),
+
+               new AltosIdler("TeleMini-v3",
+                              AltosIdler.idle_ms5607,
+                              AltosIdler.idle_sensor_tmini3),
 
                new AltosIdler("TeleMetrum-v1",
                               AltosIdler.idle_gps,
index cfa1fa2746da84690ba3df658f6e19b04eafebfa..aec2c692e3d289c40c07ce30bc59d8a4050c130b 100644 (file)
@@ -332,9 +332,11 @@ public class AltosLib {
        public static final int AO_LOG_FORMAT_TELEMEGA_OLD = 5;
        public static final int AO_LOG_FORMAT_EASYMINI = 6;
        public static final int AO_LOG_FORMAT_TELEMETRUM = 7;
-       public static final int AO_LOG_FORMAT_TELEMINI = 8;
+       public static final int AO_LOG_FORMAT_TELEMINI2 = 8;
        public static final int AO_LOG_FORMAT_TELEGPS = 9;
        public static final int AO_LOG_FORMAT_TELEMEGA = 10;
+       public static final int AO_LOG_FORMAT_DETHERM = 11;
+       public static final int AO_LOG_FORMAT_TELEMINI3 = 12;
        public static final int AO_LOG_FORMAT_NONE = 127;
 
        public static boolean isspace(int c) {
diff --git a/altoslib/AltosSensorTMini.java b/altoslib/AltosSensorTMini.java
deleted file mode 100644 (file)
index 073144d..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright © 2012 Keith Packard <keithp@keithp.com>
- *
- * 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; 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
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-
-package org.altusmetrum.altoslib_11;
-
-import java.util.concurrent.TimeoutException;
-
-public class AltosSensorTMini {
-       public int      tick;
-       public int      apogee;
-       public int      main;
-       public int      batt;
-
-       static public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException {
-               try {
-                       AltosSensorTMini        sensor_tmini = new AltosSensorTMini(link);
-
-                       if (sensor_tmini == null)
-                               return;
-                       state.set_battery_voltage(AltosConvert.tele_mini_voltage(sensor_tmini.batt));
-                       state.set_apogee_voltage(AltosConvert.tele_mini_voltage(sensor_tmini.apogee));
-                       state.set_main_voltage(AltosConvert.tele_mini_voltage(sensor_tmini.main));
-
-               } catch (TimeoutException te) {
-               }
-       }
-
-       public AltosSensorTMini(AltosLink link) throws InterruptedException, TimeoutException {
-               String[] items = link.adc();
-               for (int i = 0; i < items.length;) {
-                       if (items[i].equals("tick:")) {
-                               tick = Integer.parseInt(items[i+1]);
-                               i += 2;
-                               continue;
-                       }
-                       if (items[i].equals("apogee:")) {
-                               apogee = Integer.parseInt(items[i+1]);
-                               i += 2;
-                               continue;
-                       }
-                       if (items[i].equals("main:")) {
-                               main = Integer.parseInt(items[i+1]);
-                               i += 2;
-                               continue;
-                       }
-                       if (items[i].equals("batt:")) {
-                               batt = Integer.parseInt(items[i+1]);
-                               i += 2;
-                               continue;
-                       }
-                       i++;
-               }
-       }
-}
-
diff --git a/altoslib/AltosSensorTMini2.java b/altoslib/AltosSensorTMini2.java
new file mode 100644 (file)
index 0000000..7e00abd
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright © 2012 Keith Packard <keithp@keithp.com>
+ *
+ * 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; 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package org.altusmetrum.altoslib_11;
+
+import java.util.concurrent.TimeoutException;
+
+public class AltosSensorTMini2 {
+       public int      tick;
+       public int      apogee;
+       public int      main;
+       public int      batt;
+
+       static public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException {
+               try {
+                       AltosSensorTMini2       sensor_tmini = new AltosSensorTMini2(link);
+
+                       if (sensor_tmini == null)
+                               return;
+                       state.set_battery_voltage(AltosConvert.tele_mini_2_voltage(sensor_tmini.batt));
+                       state.set_apogee_voltage(AltosConvert.tele_mini_2_voltage(sensor_tmini.apogee));
+                       state.set_main_voltage(AltosConvert.tele_mini_2_voltage(sensor_tmini.main));
+
+               } catch (TimeoutException te) {
+               }
+       }
+
+       public AltosSensorTMini2(AltosLink link) throws InterruptedException, TimeoutException {
+               String[] items = link.adc();
+               for (int i = 0; i < items.length;) {
+                       if (items[i].equals("tick:")) {
+                               tick = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       if (items[i].equals("apogee:")) {
+                               apogee = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       if (items[i].equals("main:")) {
+                               main = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       if (items[i].equals("batt:")) {
+                               batt = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       i++;
+               }
+       }
+}
+
diff --git a/altoslib/AltosSensorTMini3.java b/altoslib/AltosSensorTMini3.java
new file mode 100644 (file)
index 0000000..19d514d
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright © 2012 Keith Packard <keithp@keithp.com>
+ *
+ * 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; 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package org.altusmetrum.altoslib_11;
+
+import java.util.concurrent.TimeoutException;
+
+public class AltosSensorTMini3 {
+       public int      tick;
+       public int      apogee;
+       public int      main;
+       public int      batt;
+
+       static public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException {
+               try {
+                       AltosSensorTMini3       sensor_tmini = new AltosSensorTMini3(link);
+
+                       if (sensor_tmini == null)
+                               return;
+                       state.set_battery_voltage(AltosConvert.tele_mini_3_battery_voltage(sensor_tmini.batt));
+                       state.set_apogee_voltage(AltosConvert.tele_mini_3_pyro_voltage(sensor_tmini.apogee));
+                       state.set_main_voltage(AltosConvert.tele_mini_3_pyro_voltage(sensor_tmini.main));
+
+               } catch (TimeoutException te) {
+               }
+       }
+
+       public AltosSensorTMini3(AltosLink link) throws InterruptedException, TimeoutException {
+               String[] items = link.adc();
+               for (int i = 0; i < items.length;) {
+                       if (items[i].equals("tick:")) {
+                               tick = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       if (items[i].equals("apogee:")) {
+                               apogee = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       if (items[i].equals("main:")) {
+                               main = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       if (items[i].equals("batt:")) {
+                               batt = Integer.parseInt(items[i+1]);
+                               i += 2;
+                               continue;
+                       }
+                       i++;
+               }
+       }
+}
+
index 0caefcd678a165e714b7e9cb3f53ce8f80578389..f830bf3582a0a452f24facbda8671e45019d642b 100644 (file)
@@ -67,7 +67,8 @@ public abstract class AltosTelemetry implements AltosStateUpdate {
        final static int packet_type_mega_data = 0x09;
        final static int packet_type_metrum_sensor = 0x0a;
        final static int packet_type_metrum_data = 0x0b;
-       final static int packet_type_mini = 0x10;
+       final static int packet_type_mini2 = 0x10;
+       final static int packet_type_mini3 = 0x11;
 
        static AltosTelemetry parse_hex(String hex)  throws ParseException, AltosCRCException {
                AltosTelemetry  telem = null;
diff --git a/altoslib/AltosTelemetryMini.java b/altoslib/AltosTelemetryMini.java
deleted file mode 100644 (file)
index 74adb05..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright © 2011 Keith Packard <keithp@keithp.com>
- *
- * 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; 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
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- */
-
-package org.altusmetrum.altoslib_11;
-
-
-public class AltosTelemetryMini extends AltosTelemetryStandard {
-       int     state;
-
-       int     v_batt;
-       int     sense_a;
-       int     sense_m;
-
-       int     pres;
-       int     temp;
-
-       int     acceleration;
-       int     speed;
-       int     height;
-
-       int     ground_pres;
-
-       public AltosTelemetryMini(int[] bytes) {
-               super(bytes);
-
-               state         = int8(5);
-
-               v_batt        = int16(6);
-               sense_a       = int16(8);
-               sense_m       = int16(10);
-
-               pres          = int32(12);
-               temp          = int16(16);
-
-               acceleration  = int16(18);
-               speed         = int16(20);
-               height        = int16(22);
-
-               ground_pres   = int32(24);
-       }
-
-       public void update_state(AltosState state) {
-               super.update_state(state);
-
-               state.set_state(this.state);
-
-               state.set_battery_voltage(AltosConvert.tele_mini_voltage(v_batt));
-               state.set_apogee_voltage(AltosConvert.tele_mini_voltage(sense_a));
-               state.set_main_voltage(AltosConvert.tele_mini_voltage(sense_m));
-
-               state.set_ground_pressure(ground_pres);
-
-               state.set_pressure(pres);
-               state.set_temperature(temp/100.0);
-
-               state.set_kalman(height, speed/16.0, acceleration/16.0);
-       }
-}
diff --git a/altoslib/AltosTelemetryMini2.java b/altoslib/AltosTelemetryMini2.java
new file mode 100644 (file)
index 0000000..50ec504
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright © 2011 Keith Packard <keithp@keithp.com>
+ *
+ * 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; 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package org.altusmetrum.altoslib_11;
+
+
+public class AltosTelemetryMini2 extends AltosTelemetryStandard {
+       int     state;
+
+       int     v_batt;
+       int     sense_a;
+       int     sense_m;
+
+       int     pres;
+       int     temp;
+
+       int     acceleration;
+       int     speed;
+       int     height;
+
+       int     ground_pres;
+
+       public AltosTelemetryMini2(int[] bytes) {
+               super(bytes);
+
+               state         = int8(5);
+
+               v_batt        = int16(6);
+               sense_a       = int16(8);
+               sense_m       = int16(10);
+
+               pres          = int32(12);
+               temp          = int16(16);
+
+               acceleration  = int16(18);
+               speed         = int16(20);
+               height        = int16(22);
+
+               ground_pres   = int32(24);
+       }
+
+       public void update_state(AltosState state) {
+               super.update_state(state);
+
+               state.set_state(this.state);
+
+               state.set_battery_voltage(AltosConvert.tele_mini_2_voltage(v_batt));
+               state.set_apogee_voltage(AltosConvert.tele_mini_2_voltage(sense_a));
+               state.set_main_voltage(AltosConvert.tele_mini_2_voltage(sense_m));
+
+               state.set_ground_pressure(ground_pres);
+
+               state.set_pressure(pres);
+               state.set_temperature(temp/100.0);
+
+               state.set_kalman(height, speed/16.0, acceleration/16.0);
+       }
+}
diff --git a/altoslib/AltosTelemetryMini3.java b/altoslib/AltosTelemetryMini3.java
new file mode 100644 (file)
index 0000000..21f8c48
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright © 2017 Keith Packard <keithp@keithp.com>
+ *
+ * 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; 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package org.altusmetrum.altoslib_11;
+
+
+public class AltosTelemetryMini3 extends AltosTelemetryStandard {
+
+       int     state;
+
+       int     v_batt;
+       int     sense_a;
+       int     sense_m;
+
+       int     pres;
+       int     temp;
+
+       int     acceleration;
+       int     speed;
+       int     height_16;
+
+       int     ground_pres;
+
+       public AltosTelemetryMini3(int[] bytes) {
+               super(bytes);
+
+               state         = int8(5);
+
+               v_batt        = int16(6);
+               sense_a       = int16(8);
+               sense_m       = int16(10);
+
+               pres          = int32(12);
+               temp          = int16(16);
+
+               acceleration  = int16(18);
+               speed         = int16(20);
+               height_16     = int16(22);
+
+               ground_pres   = int32(24);
+       }
+
+       public void update_state(AltosState state) {
+               super.update_state(state);
+
+               state.set_state(this.state);
+
+               state.set_battery_voltage(AltosConvert.tele_mini_3_battery_voltage(v_batt));
+
+               state.set_apogee_voltage(AltosConvert.tele_mini_3_pyro_voltage(sense_a));
+               state.set_main_voltage(AltosConvert.tele_mini_3_pyro_voltage(sense_m));
+
+               state.set_pressure(pres);
+               state.set_temperature(temp/100.0);
+
+               state.set_kalman(extend_height(state, height_16),
+                                speed/16.0, acceleration/16.0);
+
+               state.set_ground_pressure(ground_pres);
+       }
+}
index 4f0d7130543d43e5d953fb130aca588a2fe008f9..35d315c7972963b4b3ea1b9bfa447704c70e5d2a 100644 (file)
@@ -84,8 +84,11 @@ public abstract class AltosTelemetryStandard extends AltosTelemetry {
                case packet_type_metrum_data:
                        telem = new AltosTelemetryMetrumData(bytes);
                        break;
-               case packet_type_mini:
-                       telem = new AltosTelemetryMini(bytes);
+               case packet_type_mini2:
+                       telem = new AltosTelemetryMini2(bytes);
+                       break;
+               case packet_type_mini3:
+                       telem = new AltosTelemetryMini3(bytes);
                        break;
                default:
                        telem = new AltosTelemetryRaw(bytes);
index 2a9eb9c99e6150d090bb82821048a7cca01eb24f..3af12c99416921faadea020317670e9d48b0c58e 100644 (file)
@@ -88,7 +88,8 @@ altoslib_JAVA = \
        AltosSensorMM.java \
        AltosSensorEMini.java \
        AltosSensorTM.java \
-       AltosSensorTMini.java \
+       AltosSensorTMini2.java \
+       AltosSensorTMini3.java \
        AltosSensorMega.java \
        AltosSensorMetrum.java \
        AltosSensorTGPS.java \
@@ -105,7 +106,8 @@ altoslib_JAVA = \
        AltosTelemetryMap.java \
        AltosTelemetryMegaSensor.java \
        AltosTelemetryMegaData.java \
-       AltosTelemetryMini.java \
+       AltosTelemetryMini2.java \
+       AltosTelemetryMini3.java \
        AltosTelemetryMetrumSensor.java \
        AltosTelemetryMetrumData.java \
        AltosTelemetryReader.java \