altos: Add 'booster' mode for dual-deploy igniters
authorKeith Packard <keithp@keithp.com>
Wed, 22 Jul 2020 16:04:30 +0000 (09:04 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 22 Jul 2020 16:16:55 +0000 (09:16 -0700)
Booster mode triggers the 'main' channel at first motor burnout
allowing the use of a simple flight computer in the booster while
providing both a separation charge and an apogee event for recovery.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosConfigFCUI.java
doc/config-device.inc
src/kernel/ao_config.c
src/kernel/ao_config.h
src/kernel/ao_ignite.c

index 8df3c022a398c3067a7222768befb981ad5ff0d0..3b11fb68d716a2838a8560cf510e275c41eccaf5 100644 (file)
@@ -119,6 +119,7 @@ public class AltosConfigFCUI
                "Dual Deploy",
                "Redundant Apogee",
                "Redundant Main",
+               "Separation & Apogee",
        };
 
        static String[]         aprs_interval_values = {
index 15f9129e4d0dd55cbc5a459909aae2030de38e4a..a533ca82213debb5455671d278192640ac3d4bed 100644 (file)
@@ -171,6 +171,10 @@ ifdef::altusmetrum[]
                is fired first, followed after a two second
                delay by the 'main' channel.
 
+               Separation & Apogee::
+               This fires the 'main' channel when the first motor
+               burns out and fires the 'apogee' charge at apogee.
+
        ifdef::telemetrum,telemega,easymega,easytimer[]
        ==== Pad Orientation
 
index 217b0ab1a8cd5145dbc6470f2c95bede280144f1..24eb79d9aaeba53b2fe2db62d93929569e5633d3 100644 (file)
@@ -1039,7 +1039,7 @@ const struct ao_config_var ao_config_vars[] = {
          ao_config_log_set,            ao_config_log_show },
 #endif
 #if HAS_IGNITE
-       { "i <0 dual, 1 apogee, 2 main>\0Igniter mode",
+       { "i <0 dual, 1 apogee, 2 main, 3 booster>\0Igniter mode",
          ao_config_ignite_mode_set,    ao_config_ignite_mode_show },
 #endif
 #if HAS_AES
index 87509dff8df1e94d8b8b15866a5845d021c264c0..3cfd0d0731574c71599c5946e012a6f0d6c642bc 100644 (file)
@@ -139,6 +139,7 @@ extern uint32_t     ao_send_radio_setting;
 #define AO_IGNITE_MODE_DUAL            0
 #define AO_IGNITE_MODE_APOGEE          1
 #define AO_IGNITE_MODE_MAIN            2
+#define AO_IGNITE_MODE_BOOSTER         3
 
 #define AO_RADIO_ENABLE_CORE           1
 #define AO_RADIO_DISABLE_TELEMETRY     2
index 692460d0c0feefd3a7f7da5904324d3dbd4beeff..6c19a94cf3051a8a9d04e5a8bd6762af65259cf9 100644 (file)
@@ -127,6 +127,12 @@ ao_igniter(void)
                                ao_igniter_fire(ao_igniter_main);
                        }
                        break;
+               case AO_IGNITE_MODE_BOOSTER:
+                       if (ao_flight_fast <= ao_flight_state && ao_flight_state < ao_flight_landed)
+                               ao_igniter_fire(ao_igniter_main);
+                       if (ao_flight_drogue <= ao_flight_state && ao_flight_state < ao_flight_landed)
+                               ao_igniter_fire(ao_igniter_drogue);
+                       break;
                }
        }
 }