SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
correct_iq.h
Go to the documentation of this file.
1#pragma once
2
6
7#include "dsp/block_simple.h"
8#include <cstdint>
9
10namespace satdump
11{
12 namespace ndsp
13 {
22
30 template <typename T>
31 class CorrectIQBlock : public BlockSimple<T, T>
32 {
33 private:
34 float alpha = 0.0001;
35 float beta = 0;
36 T acc = 0;
37
38 public:
39 CorrectIQBlock();
40 ~CorrectIQBlock();
41
42 uint32_t process(T *input, uint32_t nsamples, T *output);
43
44 void init() {}
45
46 nlohmann::json get_cfg(std::string key) { throw satdump_exception(key); }
47
48 Block::cfg_res_t set_cfg(std::string key, nlohmann::json v)
49 {
50 throw satdump_exception(key);
51 return Block::RES_OK;
52 }
53 };
54 } // namespace ndsp
55} // namespace satdump
cfg_res_t
set_cfg status.
Definition block.h:227
uint32_t process(T *input, uint32_t nsamples, T *output)
Simplified "work" function, called automatically by work(). This takes away all boilerplate work usua...
Definition correct_iq.cpp:22
Block::cfg_res_t set_cfg(std::string key, nlohmann::json v)
Set parameters of the block from JSON, including potentially IO configurations for blocks that may ha...
Definition correct_iq.h:48
void init()
Applies current parameters to the block. This is called automatically once in start(),...
Definition correct_iq.h:44
nlohmann::json get_cfg(std::string key)
Get parameters of the block as JSON.
Definition correct_iq.h:46