- changed processBaseband args
- don't process CMA and DFE if they are not selected - ToDo: encapsulate DFE-on and DFE-off in one class. Always feed X to prevent switch artifacts git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@103 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+14
-20
@@ -404,26 +404,20 @@ void Receiver::processPassband(float *pRF, uint32_t len)
|
|||||||
|
|
||||||
// Arm Filtering and downsampling
|
// Arm Filtering and downsampling
|
||||||
len_down = m_firArmDown.process(m_basebandBuffer, m_passbandBuffer, len);
|
len_down = m_firArmDown.process(m_basebandBuffer, m_passbandBuffer, len);
|
||||||
for (uint32_t i=0; i < len_down; i++)
|
processBaseband(m_basebandBuffer, len_down);
|
||||||
{
|
|
||||||
m_pBasebandBuffer[i].real = m_basebandBuffer[i].real();
|
|
||||||
m_pBasebandBuffer[i].imag = m_basebandBuffer[i].imag();
|
|
||||||
}
|
|
||||||
processBaseband(m_pBasebandBuffer, len_down);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Receiver::processBaseband(float *pI, float *pQ, uint32_t len)
|
void Receiver::processBaseband(float *pI, float *pQ, uint32_t len)
|
||||||
{
|
{
|
||||||
for (uint32_t i=0; i < len/2; i++)
|
for (uint32_t i=0; i < len/2; i++)
|
||||||
{
|
{
|
||||||
m_pBasebandBuffer[i].real = pI[2*i];
|
m_basebandBuffer[i] = ComplexScalar(pI[2*i], pQ[2*i]);
|
||||||
m_pBasebandBuffer[i].imag = pQ[2*i];
|
|
||||||
}
|
}
|
||||||
processBaseband(m_pBasebandBuffer, len/2);
|
processBaseband(m_basebandBuffer, len/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Baseband processing
|
// Baseband processing
|
||||||
void Receiver::processBaseband(cpx_t *pIF, uint32_t len)
|
void Receiver::processBaseband(CVec const &iq, uint32_t len)
|
||||||
{
|
{
|
||||||
const ScopedLock sl (m_lock);
|
const ScopedLock sl (m_lock);
|
||||||
|
|
||||||
@@ -460,8 +454,8 @@ void Receiver::processBaseband(cpx_t *pIF, uint32_t len)
|
|||||||
// @2 x symbolrate
|
// @2 x symbolrate
|
||||||
for (n = 0; n < len; n++)
|
for (n = 0; n < len; n++)
|
||||||
{
|
{
|
||||||
SlidingVarProcess(&m_statistics.I_DDC, pIF[n].real);
|
SlidingVarProcess(&m_statistics.I_DDC, iq[n].real());
|
||||||
SlidingVarProcess(&m_statistics.Q_DDC, pIF[n].imag);
|
SlidingVarProcess(&m_statistics.Q_DDC, iq[n].imag());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -471,13 +465,13 @@ void Receiver::processBaseband(cpx_t *pIF, uint32_t len)
|
|||||||
if (RCF_TYPE == RCF_TYPE_POLYPHASE_DISCRETE)
|
if (RCF_TYPE == RCF_TYPE_POLYPHASE_DISCRETE)
|
||||||
{
|
{
|
||||||
// Matched filtering and interpolation
|
// Matched filtering and interpolation
|
||||||
m_polyPhase.feed(toComplexScalar(pIF[n]), 1);
|
m_polyPhase.feed(iq[n], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RCF_TYPE == RCF_TYPE_POLYPHASE_FARROW)
|
if (RCF_TYPE == RCF_TYPE_POLYPHASE_FARROW)
|
||||||
{
|
{
|
||||||
// Matched filtering and interpolation
|
// Matched filtering and interpolation
|
||||||
m_farrow.feed(toComplexScalar(pIF[n]), 1);
|
m_farrow.feed(iq[n], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -540,21 +534,21 @@ void Receiver::processBaseband(cpx_t *pIF, uint32_t len)
|
|||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
// Equalizer Process samples
|
// Equalizer Process samples
|
||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
SlidingVarGet(&m_statistics.I_CPR);
|
ComplexScalar __IQ_cma;
|
||||||
ComplexScalar __IQ_cma = m_cma2.process(toComplexScalar(IQ_cpr));
|
ComplexScalar __IQ_dfeOn;
|
||||||
IQ_cma = toCpx(__IQ_cma);
|
|
||||||
|
|
||||||
ComplexScalar __IQ_dfeOn = m_dfe_on2.process(toComplexScalar(IQ_cpr), toComplexScalar(IQ_hard_last));
|
|
||||||
IQ_dfeOn = toCpx(__IQ_dfeOn);
|
|
||||||
|
|
||||||
IQ_eq = IQ_cpr;
|
IQ_eq = IQ_cpr;
|
||||||
if (m_params.eq_mode == eq_mode_cma)
|
if (m_params.eq_mode == eq_mode_cma)
|
||||||
{
|
{
|
||||||
|
__IQ_cma = m_cma2.process(toComplexScalar(IQ_cpr));
|
||||||
|
IQ_cma = toCpx(__IQ_cma);
|
||||||
IQ_eq = IQ_cma;
|
IQ_eq = IQ_cma;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_params.eq_mode == eq_mode_dfe)
|
if (m_params.eq_mode == eq_mode_dfe)
|
||||||
{
|
{
|
||||||
|
__IQ_dfeOn = m_dfe_on2.process(toComplexScalar(IQ_cpr), toComplexScalar(IQ_hard_last));
|
||||||
|
IQ_dfeOn = toCpx(__IQ_dfeOn);
|
||||||
IQ_eq = IQ_dfeOn;
|
IQ_eq = IQ_dfeOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -342,9 +342,7 @@ private:
|
|||||||
params_t m_params;
|
params_t m_params;
|
||||||
|
|
||||||
void timerCallback();
|
void timerCallback();
|
||||||
void processBaseband(cpx_t *pIF, uint32_t len);
|
void processBaseband(CVec const &iq, uint32_t len);
|
||||||
cpx_t processMatchedFilter(cpx_t x, int32_t m, radio_float_t mu);
|
|
||||||
int Farrow_open_coeff(ppip_farrow_cpx_t *pObj, const char *filename);
|
|
||||||
void minMaxInit(minmax_t *pObj, radio_float_t min_initial, radio_float_t max_initial)
|
void minMaxInit(minmax_t *pObj, radio_float_t min_initial, radio_float_t max_initial)
|
||||||
{
|
{
|
||||||
pObj->min = min_initial;
|
pObj->min = min_initial;
|
||||||
|
|||||||
Reference in New Issue
Block a user