FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
fers_signal::DecadeUpsampler Class Reference

Implements a specialized upsampler with a fixed upsampling factor of 10. More...

#include "dsp_filters.h"

Public Member Functions

 DecadeUpsampler ()
 
 ~DecadeUpsampler ()=default
 
void upsample (RealType sample, std::span< RealType > out) const
 Upsamples a single sample.
 
 DecadeUpsampler (const DecadeUpsampler &)=delete
 
DecadeUpsampleroperator= (const DecadeUpsampler &)=delete
 
 DecadeUpsampler (DecadeUpsampler &&) noexcept=default
 
DecadeUpsampleroperator= (DecadeUpsampler &&) noexcept=default
 

Detailed Description

Implements a specialized upsampler with a fixed upsampling factor of 10.

Definition at line 156 of file dsp_filters.h.

Constructor & Destructor Documentation

◆ DecadeUpsampler() [1/3]

fers_signal::DecadeUpsampler::DecadeUpsampler ( )

11th order elliptic lowpass at 0.1fs

Definition at line 177 of file dsp_filters.cpp.

178 {
179 /// 11th order elliptic lowpass at 0.1fs
180 constexpr std::array den_coeffs = {1.0,
181 -10.301102119865,
182 48.5214567642597,
183 -137.934509572412,
184 262.914952985445,
185 -352.788381841481,
186 340.027874008585,
187 -235.39260470286,
188 114.698499845697,
189 -37.4634653062448,
190 7.38208765922137,
191 -0.664807695826097};
192
193 constexpr std::array num_coeffs = {2.7301694322809e-06, -1.8508123430239e-05, 5.75739466753894e-05,
194 -0.000104348734423658, 0.000111949190289715, -4.9384188225528e-05,
195 -4.9384188225522e-05, 0.00011194919028971, -0.000104348734423656,
196 5.75739466753884e-05, -1.85081234302388e-05, 2.73016943228086e-06};
197
198 _filter = std::make_unique<IirFilter>(den_coeffs.data(), num_coeffs.data(), den_coeffs.size());
199 }

◆ ~DecadeUpsampler()

fers_signal::DecadeUpsampler::~DecadeUpsampler ( )
default

References fers_signal::upsample().

+ Here is the call graph for this function:

◆ DecadeUpsampler() [2/3]

fers_signal::DecadeUpsampler::DecadeUpsampler ( const DecadeUpsampler )
delete

◆ DecadeUpsampler() [3/3]

fers_signal::DecadeUpsampler::DecadeUpsampler ( DecadeUpsampler &&  )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

DecadeUpsampler & fers_signal::DecadeUpsampler::operator= ( const DecadeUpsampler )
delete

◆ operator=() [2/2]

DecadeUpsampler & fers_signal::DecadeUpsampler::operator= ( DecadeUpsampler &&  )
defaultnoexcept

◆ upsample()

void fers_signal::DecadeUpsampler::upsample ( RealType  sample,
std::span< RealType out 
) const

Upsamples a single sample.

Parameters
sampleThe sample to be upsampled.
outSpan of output samples.

Definition at line 201 of file dsp_filters.cpp.

202 {
203 if (out.size() != 10)
204 {
205 throw std::invalid_argument("Output span must have a size of 10.");
206 }
207 out[0] = sample;
208 std::fill(out.begin() + 1, out.end(), 0);
209 _filter->filter(out);
210 }

The documentation for this class was generated from the following files: