ao_old_vel = ao_flight_vel;
ao_old_vel_tick = ao_flight_tick;
- /* Go to launchpad state if the nose is pointing up */
+ /* Go to pad state if the nose is pointing up */
ao_config_get();
if (ao_flight_accel < ao_config.accel_zero_g - ACCEL_NOSE_UP) {
/* Turn on telemetry system
*/
+ ao_rdf_set(1);
ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD);
- ao_flight_state = ao_flight_launchpad;
+ ao_flight_state = ao_flight_pad;
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
} else {
ao_flight_state = ao_flight_idle;
/* signal successful initialization by turning off the LED */
ao_led_off(AO_LED_RED);
break;
- case ao_flight_launchpad:
+ case ao_flight_pad:
/* Trim velocity
*
/* Increase telemetry rate */
ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_FLIGHT);
+ /* disable RDF beacon */
+ ao_rdf_set(0);
+
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
break;
}
break;
case ao_flight_boost:
- /* boost to coast:
+ /* boost to fast:
*
* accelerometer: start to fall at > 1/4 G
* OR
if (ao_flight_accel > ao_ground_accel + (ACCEL_G >> 2) ||
(int16_t) (ao_flight_tick - ao_launch_tick) > BOOST_TICKS_MAX)
{
- ao_flight_state = ao_flight_coast;
+ ao_flight_state = ao_flight_fast;
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
break;
}
break;
- case ao_flight_coast:
+ case ao_flight_fast:
- /* coast to apogee detect:
+ /* fast to coast:
*
* accelerometer: integrated velocity < 200 m/s
* OR
* apogee detect
*/
ao_min_vel = abs(ao_flight_vel);
- ao_flight_state = ao_flight_apogee;
+ ao_flight_state = ao_flight_coast;
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
}
break;
- case ao_flight_apogee:
+ case ao_flight_coast:
- /* apogee detect to drogue deploy:
+ /* apogee detect: coast to drogue deploy:
*
* accelerometer: abs(velocity) > min_velocity + 2m/s
* OR
/* turn off the ADC capture */
ao_timer_set_adc_interval(0);
+ /* Enable RDF beacon */
+ ao_rdf_set(1);
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
}