GNU Radio's TEST Package
Complex vectors math and signal processing
Collaboration diagram for Complex vectors math and signal processing:

Files

file  cxvec_math.h
 Osmocom Complex vectors math header.
 

Macros

#define M_PIf   (3.14159265358979323846264338327f)
 PI value float. More...
 

Enumerations

enum  osmo_cxvec_conv_type { CONV_FULL_SPAN , CONV_OVERLAP_ONLY , CONV_NO_DELAY }
 Various possible types of convolution span. More...
 
enum  osmo_cxvec_peak_alg { PEAK_WEIGH_WIN , PEAK_WEIGH_WIN_CENTER , PEAK_EARLY_LATE }
 Various possible peak finding algorithms. More...
 

Functions

static float osmo_sinc (float x)
 Unnormalized sinc function. More...
 
static float osmo_normsqf (float complex c)
 Squared norm of a given complex. More...
 
struct osmo_cxvecosmo_cxvec_scale (const struct osmo_cxvec *in, float complex scale, struct osmo_cxvec *out)
 
struct osmo_cxvecosmo_cxvec_rotate (const struct osmo_cxvec *in, float freq_shift, struct osmo_cxvec *out)
 
struct osmo_cxvecosmo_cxvec_delay (const struct osmo_cxvec *v, float delay, struct osmo_cxvec *out)
 
struct osmo_cxvecosmo_cxvec_convolve (const struct osmo_cxvec *f, const struct osmo_cxvec *g, enum osmo_cxvec_conv_type type, struct osmo_cxvec *out)
 
struct osmo_cxvecosmo_cxvec_correlate (const struct osmo_cxvec *f, const struct osmo_cxvec *g, int g_corr_step, struct osmo_cxvec *out)
 
float complex osmo_cxvec_interpolate_point (const struct osmo_cxvec *cv, float pos)
 
int osmo_cxvec_peaks_scan (const struct osmo_cxvec *cv, int *peaks_idx, int N)
 
float osmo_cxvec_peak_energy_find (const struct osmo_cxvec *cv, int win_size, enum osmo_cxvec_peak_alg alg, float complex *peak_val_p)
 
struct osmo_cxvecosmo_cxvec_sig_normalize (const struct osmo_cxvec *sig, int decim, float freq_shift, struct osmo_cxvec *out)
 

Detailed Description

Macro Definition Documentation

◆ M_PIf

#define M_PIf   (3.14159265358979323846264338327f)

PI value float.

Enumeration Type Documentation

◆ osmo_cxvec_conv_type

Various possible types of convolution span.

Enumerator
CONV_FULL_SPAN 

Full span (every possible overlap of f onto g)

CONV_OVERLAP_ONLY 

Every possible full overlap of f onto g.

CONV_NO_DELAY 

Center f sequence on every g sample.

◆ osmo_cxvec_peak_alg

Various possible peak finding algorithms.

Enumerator
PEAK_WEIGH_WIN 

Weigthed position for the max pwr window.

PEAK_WEIGH_WIN_CENTER 

Weighted position of the peak centered window.

PEAK_EARLY_LATE 

Early-Late balancing around peak.

Function Documentation

◆ osmo_cxvec_convolve()

struct osmo_cxvec* osmo_cxvec_convolve ( const struct osmo_cxvec f,
const struct osmo_cxvec g,
enum osmo_cxvec_conv_type  type,
struct osmo_cxvec out 
)

◆ osmo_cxvec_correlate()

struct osmo_cxvec* osmo_cxvec_correlate ( const struct osmo_cxvec f,
const struct osmo_cxvec g,
int  g_corr_step,
struct osmo_cxvec out 
)

◆ osmo_cxvec_delay()

struct osmo_cxvec* osmo_cxvec_delay ( const struct osmo_cxvec v,
float  delay,
struct osmo_cxvec out 
)

◆ osmo_cxvec_interpolate_point()

float complex osmo_cxvec_interpolate_point ( const struct osmo_cxvec cv,
float  pos 
)

◆ osmo_cxvec_peak_energy_find()

float osmo_cxvec_peak_energy_find ( const struct osmo_cxvec cv,
int  win_size,
enum osmo_cxvec_peak_alg  alg,
float complex *  peak_val_p 
)

◆ osmo_cxvec_peaks_scan()

int osmo_cxvec_peaks_scan ( const struct osmo_cxvec cv,
int *  peaks_idx,
int  N 
)

◆ osmo_cxvec_rotate()

struct osmo_cxvec* osmo_cxvec_rotate ( const struct osmo_cxvec in,
float  freq_shift,
struct osmo_cxvec out 
)

◆ osmo_cxvec_scale()

struct osmo_cxvec* osmo_cxvec_scale ( const struct osmo_cxvec in,
float complex  scale,
struct osmo_cxvec out 
)

◆ osmo_cxvec_sig_normalize()

struct osmo_cxvec* osmo_cxvec_sig_normalize ( const struct osmo_cxvec sig,
int  decim,
float  freq_shift,
struct osmo_cxvec out 
)

◆ osmo_normsqf()

static float osmo_normsqf ( float complex  c)
inlinestatic

Squared norm of a given complex.

Parameters
[in]cComplex number for which to compute the squared norm
Returns
$|c|^2$

◆ osmo_sinc()

static float osmo_sinc ( float  x)
inlinestatic

Unnormalized sinc function.

Parameters
[in]xValue for which to compute the sinc function.
Returns
The sinc(x) value

The function is defined as $\frac{\sin(x)}{x}$