FERS 0.1.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 197 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 377 of file dsp_filters.cpp.

378 {
379 /// 11th order elliptic lowpass at 0.1fs
380 constexpr std::array den_coeffs = {1.0,
381 -10.301102119865,
382 48.5214567642597,
383 -137.934509572412,
384 262.914952985445,
385 -352.788381841481,
386 340.027874008585,
387 -235.39260470286,
388 114.698499845697,
389 -37.4634653062448,
390 7.38208765922137,
391 -0.664807695826097};
392
393 constexpr std::array num_coeffs = {2.7301694322809e-06, -1.8508123430239e-05, 5.75739466753894e-05,
394 -0.000104348734423658, 0.000111949190289715, -4.9384188225528e-05,
395 -4.9384188225522e-05, 0.00011194919028971, -0.000104348734423656,
396 5.75739466753884e-05, -1.85081234302388e-05, 2.73016943228086e-06};
397
398 _filter = std::make_unique<IirFilter>(den_coeffs.data(), num_coeffs.data(), den_coeffs.size());
399 }
math::Vec3 max

References max.

◆ ~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 401 of file dsp_filters.cpp.

402 {
403 if (out.size() != 10)
404 {
405 throw std::invalid_argument("Output span must have a size of 10.");
406 }
407 out[0] = sample;
408 std::fill(out.begin() + 1, out.end(), 0);
409 _filter->filter(out);
410 }

References max.


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