APM:Libraries
Public Member Functions | Protected Attributes | List of all members
AverageFilter< T, U, FILTER_SIZE > Class Template Reference

#include <AverageFilter.h>

Inheritance diagram for AverageFilter< T, U, FILTER_SIZE >:
[legend]
Collaboration diagram for AverageFilter< T, U, FILTER_SIZE >:
[legend]

Public Member Functions

 AverageFilter ()
 
virtual T apply (T sample)
 
virtual void reset ()
 
- Public Member Functions inherited from FilterWithBuffer< T, FILTER_SIZE >
 FilterWithBuffer ()
 
uint8_t get_filter_size () const
 
get_sample (uint8_t i) const
 

Protected Attributes

uint8_t _num_samples
 
- Protected Attributes inherited from FilterWithBuffer< T, FILTER_SIZE >
samples [FILTER_SIZE]
 
uint8_t sample_index
 

Detailed Description

template<class T, class U, uint8_t FILTER_SIZE>
class AverageFilter< T, U, FILTER_SIZE >

Definition at line 28 of file AverageFilter.h.

Constructor & Destructor Documentation

◆ AverageFilter()

template<class T, class U, uint8_t FILTER_SIZE>
AverageFilter< T, U, FILTER_SIZE >::AverageFilter ( )
inline

Definition at line 32 of file AverageFilter.h.

Member Function Documentation

◆ apply()

template<class T, class U , uint8_t FILTER_SIZE>
T AverageFilter< T, U, FILTER_SIZE >::apply ( sample)
virtual

Reimplemented from FilterWithBuffer< T, FILTER_SIZE >.

Reimplemented in AverageIntegralFilter< T, U, FILTER_SIZE >, and AverageIntegralFilter< int32_t, int32_t, 10 >.

Definition at line 79 of file AverageFilter.h.

Referenced by AverageFilter< int32_t, int32_t, FILTER_SIZE >::AverageFilter(), readTemp(), and AP_TECS::update_50hz().

Here is the caller graph for this function:

◆ reset()

template<class T , class U , uint8_t FILTER_SIZE>
void AverageFilter< T, U, FILTER_SIZE >::reset ( void  )
virtual

Reimplemented from FilterWithBuffer< T, FILTER_SIZE >.

Definition at line 100 of file AverageFilter.h.

Referenced by AverageFilter< int32_t, int32_t, FILTER_SIZE >::AverageFilter().

Here is the caller graph for this function:

Member Data Documentation

◆ _num_samples

template<class T, class U, uint8_t FILTER_SIZE>
uint8_t AverageFilter< T, U, FILTER_SIZE >::_num_samples
protected

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