kopia lustrzana https://github.com/mobilinkd/m17-cxx-demod
Fix clock recovery update(). Remove limits on when an update can be done.
rodzic
21f87006ec
commit
6f84b14530
|
@ -53,12 +53,6 @@ struct ClockRecovery
|
|||
*/
|
||||
bool update(uint8_t index)
|
||||
{
|
||||
if (count_ < 480)
|
||||
{
|
||||
sample_index_ = index;
|
||||
return false;
|
||||
}
|
||||
|
||||
auto f = kf_.update(index, count_);
|
||||
|
||||
// Constrain sample index to [0..SamplesPerSymbol), wrapping if needed.
|
||||
|
@ -81,7 +75,7 @@ struct ClockRecovery
|
|||
*/
|
||||
bool update()
|
||||
{
|
||||
auto csw = std::fmod((sample_estimate_ + (1.0 + clock_estimate_) * count_), SamplesPerSymbol);
|
||||
auto csw = std::fmod((sample_estimate_ + clock_estimate_ * count_), SamplesPerSymbol);
|
||||
if (csw < 0.) csw += SamplesPerSymbol;
|
||||
else if (csw >= SamplesPerSymbol) csw -= SamplesPerSymbol;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue