#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "agc.h"
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 double(* agc_algorithm)(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 | |||
) |
Creates, and returns a pointer to an agc object.
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.
gain_object | Pointer to the gain object to destroy. |
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.
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] |
Definition at line 108 of file agc.c.
References s_agc::gain, s_agc::gain_decrease_correction_factor, s_agc::gain_increase_correction_factor, s_agc::max_amp, and s_agc::maximum_gain.
static double agc_update_2 | ( | agc | gain_object, | |
double | current_amplitude | |||
) | [static] |
Definition at line 121 of file agc.c.
References 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.
static double agc_update_3 | ( | agc | gain_object, | |
double | current_amplitude | |||
) | [static] |
Definition at line 144 of file agc.c.
References s_agc::gain, s_agc::gain_decrease_correction_factor, s_agc::gain_increase_correction_factor, s_agc::max_amp, and s_agc::maximum_gain.
static double agc_update_4 | ( | agc | gain_object, | |
double | current_amplitude | |||
) | [static] |
Definition at line 161 of file agc.c.
References s_agc::gain, s_agc::gain_increase_correction_factor, s_agc::max_amp, and s_agc::maximum_gain.
const agc_algorithm AGC_ALGOR_TABLE[AGC_NUMBER_OF_ADJUSTMENT_TYPES] [static] |