1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-13 23:13:49 -04:00

Test Source: add phase imbalance control

This commit is contained in:
f4exb
2018-01-31 22:34:55 +01:00
parent 5cbfcccb85
commit 373aa6960f
11 changed files with 94 additions and 40 deletions
+8
View File
@@ -61,6 +61,14 @@ Complex NCOF::nextIQ()
return Complex(m_table[phase], -m_table[(phase + TableSize / 4) % TableSize]);
}
Complex NCOF::nextIQ(float imbalance)
{
int phase = nextPhase();
int phaseQ = imbalance < 0.0 ? phase + (int) (imbalance*TableSize) : phase;
int phaseI = imbalance < 0.0 ? phase : phase + (int) (imbalance*TableSize);
return Complex(m_table[phaseI % TableSize], -m_table[(phaseQ + TableSize / 4) % TableSize]);
}
Complex NCOF::nextQI()
{
int phase = nextPhase();