SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Private Attributes | List of all members
leansdr::linear_sampler< T > Struct Template Reference

#include <sdr.h>

+ Inheritance diagram for leansdr::linear_sampler< T >:
+ Collaboration diagram for leansdr::linear_sampler< T >:

Public Member Functions

int readahead ()
 
complex< T > interp (const complex< T > *pin, float mu, float phase)
 
void update_freq (float _freqw, int period=1)
 
- Public Member Functions inherited from leansdr::sampler_interface< T >
virtual ~sampler_interface ()
 

Private Attributes

trig16 trig
 
float freqw
 

Detailed Description

template<typename T>
struct leansdr::linear_sampler< T >

Definition at line 927 of file sdr.h.

Member Function Documentation

◆ interp()

template<typename T >
complex<T> leansdr::linear_sampler< T >::interp ( const complex< T > *  pin,
float  mu,
float  phase 
)
inlinevirtual

Implements leansdr::sampler_interface< T >.

Definition at line 934 of file sdr.h.

935  {
936  // Derotate pin[0] and pin[1]
937  complex<T> s0 = pin[0] * trig.expi(-phase);
938  complex<T> s1 = pin[1] * trig.expi(-(phase + freqw));
939  // Interpolate linearly
940  return s0 * (1 - mu) + s1 * mu;
941  }
const complex< float > & expi(uint16_t a) const
Definition: math.h:146

◆ readahead()

template<typename T >
int leansdr::linear_sampler< T >::readahead ( )
inlinevirtual

Implements leansdr::sampler_interface< T >.

Definition at line 929 of file sdr.h.

930  {
931  return 1;
932  }

◆ update_freq()

template<typename T >
void leansdr::linear_sampler< T >::update_freq ( float  _freqw,
int  period = 1 
)
inlinevirtual

Reimplemented from leansdr::sampler_interface< T >.

Definition at line 943 of file sdr.h.

944  {
945  (void) period;
946  freqw = _freqw;
947  }

Member Data Documentation

◆ freqw

template<typename T >
float leansdr::linear_sampler< T >::freqw
private

Definition at line 951 of file sdr.h.

◆ trig

template<typename T >
trig16 leansdr::linear_sampler< T >::trig
private

Definition at line 950 of file sdr.h.


The documentation for this struct was generated from the following file: