diff --git a/radio/interpolation/Interpolator.cpp b/radio/interpolation/Interpolator.cpp new file mode 100644 index 0000000..e959469 --- /dev/null +++ b/radio/interpolation/Interpolator.cpp @@ -0,0 +1,38 @@ +#include "Interpolator.hpp" + +namespace Radio +{ +namespace Interpolation +{ +Interpolator::Interpolator() +: m_mu (0) +{ + +} + +Interpolator::~Interpolator() +{ + +} + +void Interpolator::setMu(radio_float_t mu) +{ + m_mu = mu; +} + + +size_t Interpolator::process(radio_float_t dMu) +{ + radio_float_t nextMu = m_mu + dMu; + size_t adv = nextMu; + nextMu -= adv; + return adv; +} + +radio_float_t Interpolator::getMu() +{ + return m_mu; +} + +} // Interpolation +} // Radio diff --git a/radio/interpolation/Interpolator.hpp b/radio/interpolation/Interpolator.hpp new file mode 100644 index 0000000..8f82f3a --- /dev/null +++ b/radio/interpolation/Interpolator.hpp @@ -0,0 +1,30 @@ +#ifndef _INTERPOLATION_INTERPOLATOR_HPP_ +#define _INTERPOLATION_INTERPOLATOR_HPP_ + +#pragma once + +#include +#include + +namespace Radio +{ +namespace Interpolation +{ +class Interpolator +{ +public: + Interpolator(); + virtual ~Interpolator(); + + void setMu(radio_float_t mu); + radio_float_t getMu(); + size_t process(radio_float_t dMu); +private: + radio_float_t m_mu; + + +}; +} // Interpolation +} // Radio + +#endif // _INTERPOLATION_INTERPOLATOR_HPP_ \ No newline at end of file