- AGC and Tracker: added reset() method
This commit is contained in:
@@ -7,11 +7,11 @@
|
|||||||
// AGC
|
// AGC
|
||||||
// Scalar version
|
// Scalar version
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
void AGC_Init(agc_t *pObj, uint32_t windowLength, radio_float_t w_init)
|
void AGC_Init(agc_t *pObj, uint32_t windowLength, radio_float_t w_min, radio_float_t w_max)
|
||||||
{
|
{
|
||||||
pObj->w = w_init;
|
pObj->w = 1;
|
||||||
pObj->w_max = 4;
|
pObj->w_min = w_min;
|
||||||
pObj->w_min = 0;
|
pObj->w_max = w_max;
|
||||||
SlidingMinMaxInit(&pObj->slMax, windowLength, (radio_float_t)1E12, 1);
|
SlidingMinMaxInit(&pObj->slMax, windowLength, (radio_float_t)1E12, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,6 +20,11 @@ void AGC_Free(agc_t *pObj)
|
|||||||
SlidingMinMaxFree(&pObj->slMax);
|
SlidingMinMaxFree(&pObj->slMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AGC_reset(agc_t *pObj, radio_float_t w_init)
|
||||||
|
{
|
||||||
|
pObj->w = w_init;
|
||||||
|
}
|
||||||
|
|
||||||
void AGC_Process(agc_t *pObj, radio_float_t x, radio_float_t mu, radio_float_t target)
|
void AGC_Process(agc_t *pObj, radio_float_t x, radio_float_t mu, radio_float_t target)
|
||||||
{
|
{
|
||||||
radio_float_t d2;
|
radio_float_t d2;
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ extern "C" {
|
|||||||
// AGC
|
// AGC
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
// Scalar version
|
// Scalar version
|
||||||
void AGC_Init(agc_t *pObj, uint32_t windowLength, radio_float_t w_init);
|
void AGC_Init(agc_t *pObj, uint32_t windowLength, radio_float_t w_min, radio_float_t w_max);
|
||||||
void AGC_Free(agc_t *pObj);
|
void AGC_Free(agc_t *pObj);
|
||||||
|
void AGC_reset(agc_t *pObj, radio_float_t w_init);
|
||||||
void AGC_Train(agc_t *pObj, radio_float_t e, radio_float_t mu);
|
void AGC_Train(agc_t *pObj, radio_float_t e, radio_float_t mu);
|
||||||
void AGC_Process(agc_t *pObj, radio_float_t x, radio_float_t mu, radio_float_t target);
|
void AGC_Process(agc_t *pObj, radio_float_t x, radio_float_t mu, radio_float_t target);
|
||||||
radio_float_t AGC_GetWeight(agc_t *pObj);
|
radio_float_t AGC_GetWeight(agc_t *pObj);
|
||||||
|
|||||||
Reference in New Issue
Block a user