- refactored
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@979 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#include "TimingGenerator.hpp"
|
||||
#include <iostream>
|
||||
|
||||
namespace Radio
|
||||
{
|
||||
namespace Interpolation
|
||||
{
|
||||
TimingGenerator::TimingGenerator()
|
||||
: m_omega(1)
|
||||
, m_mu(0)
|
||||
, m_adv(0)
|
||||
{
|
||||
}
|
||||
|
||||
TimingGenerator::~TimingGenerator()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TimingGenerator::setOmega(radio_float_t omega)
|
||||
{
|
||||
m_omega = omega;
|
||||
}
|
||||
|
||||
void TimingGenerator::process(ComplexScalar const &iq)
|
||||
{
|
||||
(void)iq;
|
||||
update();
|
||||
}
|
||||
|
||||
void TimingGenerator::update()
|
||||
{
|
||||
m_mu += m_omega;
|
||||
m_adv = (size_t)m_mu;
|
||||
m_mu -= m_adv;
|
||||
}
|
||||
|
||||
radio_float_t TimingGenerator::getMu() const
|
||||
{
|
||||
return m_mu;
|
||||
}
|
||||
|
||||
size_t TimingGenerator::getAdv() const
|
||||
{
|
||||
return m_adv;
|
||||
}
|
||||
|
||||
} // Interpolation
|
||||
} // Radio
|
||||
Reference in New Issue
Block a user