#define PI 3.141592654 int generate_tone(float *samples, float freq, int len); float dc_level(float *x, float length); float max_abs(float *x, int length); void complex_base_band(float *x, int length, float freq, float phase, float *yi, float *yq); float get_gain(float dc_i, float dc_q); float get_phase(float dc_i, float dc_q);