- STR: removed alternate impl
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/radio@992 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+3
-15
@@ -91,7 +91,6 @@ void LeadLagSetState(lead_lag_filter_t *pObj, radio_float_t state)
|
||||
void STRGardnerInit(str_t *pObj)
|
||||
{
|
||||
memset(pObj->d, 0, sizeof(pObj->d));
|
||||
pObj->alternate_impl = 0;
|
||||
}
|
||||
|
||||
radio_float_t STRGardnerProcess(str_t *pObj, cpx_t x)
|
||||
@@ -101,20 +100,9 @@ radio_float_t STRGardnerProcess(str_t *pObj, cpx_t x)
|
||||
|
||||
pD = pObj->d;
|
||||
|
||||
if (pObj->alternate_impl)
|
||||
{
|
||||
t.real = (x.real - pD[1].real) * pD[0].real;
|
||||
t.imag = (x.imag - pD[1].imag) * pD[0].imag;
|
||||
|
||||
radio_float_t sign = (t.real*t.imag) < 0 ? -1.0 : 1.0;
|
||||
Vd = sqrt(fabs(t.real) * fabs(t.imag)) * sign;
|
||||
}
|
||||
else
|
||||
{
|
||||
t.real = (pD[1].real - x.real) * pD[0].real;
|
||||
t.imag = (pD[1].imag - x.imag) * pD[0].imag;
|
||||
Vd = (t.real + t.imag);
|
||||
}
|
||||
t.real = (pD[1].real - x.real) * pD[0].real;
|
||||
t.imag = (pD[1].imag - x.imag) * pD[0].imag;
|
||||
Vd = (t.real + t.imag);
|
||||
|
||||
// Adjust delay line
|
||||
pD[1] = pD[0];
|
||||
|
||||
@@ -32,7 +32,6 @@ typedef struct _lead_lag_coeff_t
|
||||
typedef struct _str_t
|
||||
{
|
||||
cpx_t d[2];
|
||||
int alternate_impl;
|
||||
|
||||
} str_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user