agc.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "agc.h"

Include dependency graph for agc.c:

Go to the source code of this file.

Data Structures

struct  s_agc

Typedefs

typedef double(* agc_algorithm )(agc gain_object, double current_amplitude)

Functions

static double agc_update_1 (agc gain_object, double current_amplitude)
static double agc_update_2 (agc gain_object, double current_amplitude)
static double agc_update_3 (agc gain_object, double current_amplitude)
static double agc_update_4 (agc gain_object, double current_amplitude)
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)
double agc_update (agc gain_object, double current_amplitude)
void agc_destroy (agc *gain_object)

Variables

static const agc_algorithm AGC_ALGOR_TABLE [AGC_NUMBER_OF_ADJUSTMENT_TYPES]


Typedef Documentation

typedef double(* agc_algorithm)(agc gain_object, double current_amplitude)

Definition at line 59 of file agc.c.


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().

static double agc_update_1 ( agc  gain_object,
double  current_amplitude 
) [static]

static double agc_update_2 ( agc  gain_object,
double  current_amplitude 
) [static]

static double agc_update_3 ( agc  gain_object,
double  current_amplitude 
) [static]

static double agc_update_4 ( agc  gain_object,
double  current_amplitude 
) [static]


Variable Documentation

const agc_algorithm AGC_ALGOR_TABLE[AGC_NUMBER_OF_ADJUSTMENT_TYPES] [static]

Initial value:

Definition at line 66 of file agc.c.

Referenced by agc_update().


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