GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
Exponential_Smoother Class Reference

Class that implements a first-order exponential smoother. More...

#include <exponential_smoother.h>

Public Member Functions

 Exponential_Smoother ()
 Constructor.
 ~Exponential_Smoother ()=default
 Destructor.
 Exponential_Smoother (Exponential_Smoother &&)=default
 Move operator.
Exponential_Smootheroperator= (Exponential_Smoother &&)=default
 Move assignment operator.
void set_alpha (float alpha)
 0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0.001
void set_samples_for_initialization (int num_samples)
 Number of samples averaged for initialization. Default value: 200.
void reset ()
void set_min_value (float value)
void set_offset (float offset)
float smooth (float raw)
double smooth (double raw)

Detailed Description

Class that implements a first-order exponential smoother.

smoothed_value[k] = alpha * raw + (1-alpha) * smoothed_value[k-1]

The length of the initialization can be controlled with set_samples_for_initialization(int num_samples)

Definition at line 39 of file exponential_smoother.h.

Constructor & Destructor Documentation

◆ Exponential_Smoother() [1/2]

Exponential_Smoother::Exponential_Smoother ( )

Constructor.

Referenced by Exponential_Smoother(), and operator=().

◆ ~Exponential_Smoother()

Exponential_Smoother::~Exponential_Smoother ( )
default

Destructor.

◆ Exponential_Smoother() [2/2]

Exponential_Smoother::Exponential_Smoother ( Exponential_Smoother && )
default

Move operator.

References Exponential_Smoother().

Member Function Documentation

◆ operator=()

Exponential_Smoother & Exponential_Smoother::operator= ( Exponential_Smoother && )
default

Move assignment operator.

References Exponential_Smoother().

◆ set_alpha()

void Exponential_Smoother::set_alpha ( float alpha)

0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0.001

◆ set_samples_for_initialization()

void Exponential_Smoother::set_samples_for_initialization ( int num_samples)

Number of samples averaged for initialization. Default value: 200.


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