Пример #1
0
void guidance_v_init(void)
{

  guidance_v_mode = GUIDANCE_V_MODE_KILL;

  guidance_v_kp = GUIDANCE_V_HOVER_KP;
  guidance_v_kd = GUIDANCE_V_HOVER_KD;
  guidance_v_ki = GUIDANCE_V_HOVER_KI;

  guidance_v_z_sum_err = 0;

  guidance_v_nominal_throttle = GUIDANCE_V_NOMINAL_HOVER_THROTTLE;
  guidance_v_adapt_throttle_enabled = GUIDANCE_V_ADAPT_THROTTLE_ENABLED;

  gv_adapt_init();

#if GUIDANCE_V_MODE_MODULE_SETTING == GUIDANCE_V_MODE_MODULE
  guidance_v_module_init();
#endif

#if PERIODIC_TELEMETRY
  register_periodic_telemetry(DefaultPeriodic, "VERT_LOOP", send_vert_loop);
  register_periodic_telemetry(DefaultPeriodic, "TUNE_VERT", send_tune_vert);
#endif
}
Пример #2
0
void guidance_v_init(void) {

  guidance_v_mode = GUIDANCE_V_MODE_KILL;

  guidance_v_kp = GUIDANCE_V_HOVER_KP;
  guidance_v_kd = GUIDANCE_V_HOVER_KD;
  guidance_v_ki = GUIDANCE_V_HOVER_KI;

  guidance_v_z_sum_err = 0;

#ifdef GUIDANCE_V_NOMINAL_HOVER_THROTTLE
  guidance_v_nominal_throttle = GUIDANCE_V_NOMINAL_HOVER_THROTTLE * MAX_PPRZ;
#endif

  gv_adapt_init();
}
Пример #3
0
void guidance_v_init(void) {

  guidance_v_mode = GUIDANCE_V_MODE_KILL;

  guidance_v_kp = GUIDANCE_V_HOVER_KP;
  guidance_v_kd = GUIDANCE_V_HOVER_KD;
  guidance_v_ki = GUIDANCE_V_HOVER_KI;

  guidance_v_z_sum_err = 0;

  min_bound = GUIDANCE_V_MIN_BOUND;
  max_bound = GUIDANCE_V_MAX_BOUND;

  #ifdef BATT_THRUST_FIX
  nom_thrust = GUIDANCE_V_NOM_THRUST;
  #endif

  gv_adapt_init();
}
Пример #4
0
void guidance_v_notify_in_flight(bool_t in_flight)
{
  if (in_flight) {
    gv_adapt_init();
  }
}