agc.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct s_agcagc

Enumerations

enum  te_agc_types {
  AGC_LINEAR_PEAK_LIMIT = 0, AGC_PERCENTAGE_W_NOISE_FLOOR, AGC_PERCENTAGE_PEAK_LIMIT, AGC_LINEAR_PEAK_W_COMPUTED_GAIN_ON_CLIP,
  AGC_NUMBER_OF_ADJUSTMENT_TYPES
}

Functions

agc agc_create (double max_gain, double min_gain, double noise_floor, double max_amp, te_agc_types agc_type, double gain_increase_correct, double gain_decrease_correct)
void agc_destroy (agc *gain_object)
double agc_update (agc gain_object, double current_amplitude)


Typedef Documentation

typedef struct s_agc* agc

Pointer to a automatic gain object (private members). Used to scale the FFT data to fit on the FFT plot.

Definition at line 57 of file agc.h.


Enumeration Type Documentation

AGC algorithm types.

See also:
gain_decrease_correct

current_amplitude

max_amp

gain_increase_correct

Enumerator:
AGC_LINEAR_PEAK_LIMIT  This type of AGC reduces the gain by gain_decrease_correct when current_amplitude is above max_amp. If this is false, agc gain is increased by gain_increase_correct.
AGC_PERCENTAGE_W_NOISE_FLOOR  This type of AGC multiplies the gain by (1 - gain_decrease_correct) when current_amplitude is above max_amp. If current_amplitude is below max_amp, and above noise_floor, it multiples the gain by (1 + gain_increase_correct).
AGC_PERCENTAGE_PEAK_LIMIT  This type of AGC multiplies the gain by (1 - gain_decrease_correct) when current_amplitude is above max_amp. If current_amplitude is below max_amp it multiples the gain by (1 + gain_increase_correct).
AGC_LINEAR_PEAK_W_COMPUTED_GAIN_ON_CLIP  This type of AGC reduces computes the correct gain when current_amplitude is above max_amp. If this is false, agc gain is increased by gain_increase_correct.
AGC_NUMBER_OF_ADJUSTMENT_TYPES 

Definition at line 30 of file agc.h.


Function Documentation

agc agc_create ( double  max_gain,
double  min_gain,
double  noise_floor,
double  max_amp,
te_agc_types  agc_type,
double  gain_increase_correct,
double  gain_decrease_correct 
)

Creates, and returns a pointer to an agc object.

See also:
agc_destroy
Parameters:
max_gain The maximum gain of the agc object.
min_gain The minimum gain of the agc object.
noise_floor The minimum amplitude required to compute a ngew gain.
max_amp The maximum amplitude desired.
agc_type The type of AGC gain correction.
gain_increase_correct The factor by which the gain will be increased.
gain_decrease_correct The factor by which the gain will be decreased.

Definition at line 73 of file agc.c.

References AGC_LINEAR_PEAK_LIMIT, AGC_NUMBER_OF_ADJUSTMENT_TYPES, s_agc::agc_type, s_agc::gain, s_agc::gain_decrease_correction_factor, s_agc::gain_increase_correction_factor, s_agc::max_amp, s_agc::maximum_gain, s_agc::minimum_gain, and s_agc::noise_floor.

Referenced by morse_start_threads().

void agc_destroy ( agc gain_object  ) 

De-allocates the automatic gain object.

Parameters:
gain_object Pointer to the gain object to destroy.
See also:
agc

agc_create

Definition at line 179 of file agc.c.

Referenced by free_all().

double agc_update ( agc  gain_object,
double  current_amplitude 
)

Updates the agc gain, returns the new gain.

See also:
agc_create
Parameters:
gain_object Automatic gain control object.
current_amplitude The current amplitude.

Definition at line 103 of file agc.c.

References AGC_ALGOR_TABLE, and s_agc::agc_type.

Referenced by morse_create_fft_amp_array().


Generated on Mon Jun 22 21:38:37 2009 for morse2txt by  doxygen 1.5.6