mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
SSB demod: fixed step up/down factor calculation (float)
This commit is contained in:
parent
6df03cd147
commit
432ab7d834
@ -107,7 +107,7 @@ double MagSquaredAGC::feedAndGetValue(const Complex& ci)
|
|||||||
m_stepUpCounter++;
|
m_stepUpCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_u0 * StepFunctions::smootherstep(m_stepUpCounter/m_stepLength);
|
return m_u0 * StepFunctions::smootherstep( ((float) m_stepUpCounter) / ((float) m_stepLength) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ double MagSquaredAGC::feedAndGetValue(const Complex& ci)
|
|||||||
m_stepDownCounter--;
|
m_stepDownCounter--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_u0 * StepFunctions::smootherstep(m_stepDownCounter/m_stepLength);
|
return m_u0 * StepFunctions::smootherstep( ((float) m_stepDownCounter) / ((float) m_stepLength) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//return (m_count < m_moving_average.historySize()) ? m_u0 : 0.0;
|
//return (m_count < m_moving_average.historySize()) ? m_u0 : 0.0;
|
||||||
@ -190,7 +190,7 @@ double MagAGC::feedAndGetValue(const Complex& ci)
|
|||||||
m_stepUpCounter++;
|
m_stepUpCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_u0 * StepFunctions::smootherstep(m_stepUpCounter/m_stepLength);
|
return m_u0 * StepFunctions::smootherstep( ((float) m_stepUpCounter) / ((float) m_stepLength) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -200,7 +200,7 @@ double MagAGC::feedAndGetValue(const Complex& ci)
|
|||||||
m_stepDownCounter--;
|
m_stepDownCounter--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_u0 * StepFunctions::smootherstep(m_stepDownCounter/m_stepLength);
|
return m_u0 * StepFunctions::smootherstep( ((float) m_stepDownCounter) / ((float) m_stepLength) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//return (m_count < m_moving_average.historySize()) ? m_u0 : 0.0;
|
//return (m_count < m_moving_average.historySize()) ? m_u0 : 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user