1
0
Fork 0
mirror of https://github.com/hb9fxq/gr-digitalhf synced 2024-12-22 15:10:00 +00:00
gr-digitalhf/lib/kalman_exp.hpp
Christoph Mayer 95cb14d38e volk::vector
2019-09-24 13:29:56 +02:00

45 lines
866 B
C++

// -*- c++ -*-
#ifndef _LIB_KALMAN_EXP_HPP_
#define _LIB_KALMAN_EXP_HPP_
#include <vector>
#include "filter_update.hpp"
#include "volk_alloc.h"
// see
// [1] https://open.library.ubc.ca/collections/ubctheses/831/items/1.0096286
namespace gr {
namespace digitalhf {
class kalman_exp : public filter_update {
public:
virtual ~kalman_exp();
static sptr make(float r, float lambda);
virtual void reset();
virtual gr_complex const* update(gr_complex const*, gr_complex const*);
virtual void set_parameters(std::map<std::string, float>const &);
protected:
void resize(size_t);
private:
kalman_exp(float r, float lambda);
typedef volk::vector<gr_complex> vec_type;
float _lambda;
float _r;
vec_type _gain;
vec_type _p;
vec_type _temp;
vec_type _t1;
} ;
} // namespace digitalhf
} // namespace gr
#endif // _LIB_KALMAN_EXP_HPP_