- TimingGnerator has omega and takes dOmega

git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@1001 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2022-06-16 16:27:53 +00:00
parent dedc17f0ac
commit e418e45fd3
2 changed files with 13 additions and 4 deletions
+9 -3
View File
@@ -6,7 +6,8 @@ namespace Radio
namespace Interpolation namespace Interpolation
{ {
TimingGenerator::TimingGenerator() TimingGenerator::TimingGenerator()
: m_mu(0) : m_omega(0)
, m_mu(0)
, m_adv(0) , m_adv(0)
{ {
} }
@@ -16,15 +17,20 @@ TimingGenerator::~TimingGenerator()
} }
void TimingGenerator::setOmega(radio_float_t omega)
{
m_omega = omega;
}
void TimingGenerator::process(ComplexScalar const &iq) void TimingGenerator::process(ComplexScalar const &iq)
{ {
(void)iq; (void)iq;
update(1.0); update(1.0);
} }
void TimingGenerator::update(radio_float_t omega) void TimingGenerator::update(radio_float_t dOmega)
{ {
m_mu += omega; m_mu += (m_omega + dOmega);
m_adv = (size_t)m_mu; m_adv = (size_t)m_mu;
m_mu -= m_adv; m_mu -= m_adv;
} }
+4 -1
View File
@@ -22,10 +22,13 @@ public:
radio_float_t getMu() const; radio_float_t getMu() const;
virtual void process(ComplexScalar const &iq); virtual void process(ComplexScalar const &iq);
void setOmega(radio_float_t omega);
protected: private:
radio_float_t m_omega;
radio_float_t m_mu; radio_float_t m_mu;
size_t m_adv; size_t m_adv;
protected:
void update(radio_float_t omega); void update(radio_float_t omega);
}; };