Beispiel #1
0
bool_t gls_init(uint8_t _af, uint8_t _tod, uint8_t _td) {

  init = TRUE;

#if USE_AIRSPEED
  //float wind_additional = sqrt(wind_east*wind_east + wind_north*wind_north); // should be gusts only!
  //Bound(wind_additional, 0, 0.5);
  //target_speed = FL_ENVE_V_S * 1.3 + wind_additional; FIXME
  target_speed =  APP_TARGET_SPEED; //  ok for now!
#endif

  app_angle = APP_ANGLE;
  app_intercept_af_tod = APP_INTERCEPT_AF_TOD;
  Bound(app_intercept_af_tod,0,200);


  gls_compute_TOD(_af, _tod, _td);	// calculate Top Of Decent

  return FALSE;
}  /* end of gls_init() */
Beispiel #2
0
bool_t gls_start(uint8_t _af,uint8_t _sd, uint8_t _tod, uint8_t _td) {

  init = TRUE;

  //struct FloatVect2* wind = stateGetHorizontalWindspeed_f();
  //float wind_additional = sqrt(wind->x*wind->x + wind->y*wind->y); // should be gusts only!
  //Bound(wind_additional, 0, 0.5);
  //target_speed = STALL_AIRSPEED * 1.3 + wind_additional; FIXME
  target_speed =  APP_TARGET_SPEED; //  ok for now!

  app_angle = APP_ANGLE;
  app_intercept_rate = APP_INTERCEPT_RATE;
  app_intercept_rate = ABS(app_intercept_rate);
  app_distance_af_sd = APP_DISTANCE_AF_SD;
  Bound(app_distance_af_sd,0,200);

  // calculate Top Of Decent
  gls_compute_TOD(_af, _sd, _tod, _td);

  return FALSE;
}  /* end of gls_init() */