+
+ /* apogee detect to drogue deploy:
+ *
+ * accelerometer: abs(velocity) > min_velocity + 2m/s
+ * OR
+ * barometer: fall at least 10m
+ *
+ * If the barometer saturates because the flight
+ * goes over its measuring range (about 53k'),
+ * requiring a 10m fall will avoid prematurely
+ * detecting apogee; the accelerometer will take
+ * over in that case and the integrated velocity
+ * measurement should suffice to find apogee
+ */
+ if (abs(ao_flight_vel) > ao_min_vel + ACCEL_VEL_APOGEE ||
+ ao_flight_pres > ao_min_pres + BARO_APOGEE)
+ {
+ /* ignite the drogue charge */
+ ao_ignite(ao_igniter_drogue);
+
+ /* slow down the telemetry system */
+ ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_RECOVER);
+
+ /* Enable RDF beacon */
+ ao_rdf_set(1);
+
+ ao_flight_state = ao_flight_drogue;
+ ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
+ }
+ break;