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

#include <DerivativeFilter.h>

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

Public Member Functions

 DerivativeFilter ()
 
void update (T sample, uint32_t timestamp)
 
float slope (void)
 
virtual void reset ()
 
- Public Member Functions inherited from FilterWithBuffer< T, FILTER_SIZE >
 FilterWithBuffer ()
 
virtual T apply (T sample)
 
uint8_t get_filter_size () const
 
get_sample (uint8_t i) const
 

Private Attributes

bool _new_data
 
float _last_slope
 
uint32_t _timestamps [FILTER_SIZE]
 

Additional Inherited Members

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

Detailed Description

template<class T, uint8_t FILTER_SIZE>
class DerivativeFilter< T, FILTER_SIZE >

Definition at line 28 of file DerivativeFilter.h.

Constructor & Destructor Documentation

◆ DerivativeFilter()

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

Definition at line 32 of file DerivativeFilter.h.

Member Function Documentation

◆ reset()

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

Reimplemented from FilterWithBuffer< T, FILTER_SIZE >.

Definition at line 116 of file DerivativeFilter.cpp.

Referenced by DerivativeFilter< float, 7 >::DerivativeFilter(), and DerivativeFilter< float, 7 >::reset().

Here is the caller graph for this function:

◆ slope()

template<class T , uint8_t FILTER_SIZE>
template float DerivativeFilter< T, FILTER_SIZE >::slope ( void  )

Definition at line 52 of file DerivativeFilter.cpp.

Referenced by DerivativeFilter< float, 7 >::DerivativeFilter(), AP_Baro::get_climb_rate(), loop(), and DerivativeFilter< float, 7 >::reset().

Here is the caller graph for this function:

◆ update()

template<class T, uint8_t FILTER_SIZE>
template void DerivativeFilter< T, FILTER_SIZE >::update ( sample,
uint32_t  timestamp 
)

Definition at line 27 of file DerivativeFilter.cpp.

Referenced by DerivativeFilter< float, 7 >::DerivativeFilter(), loop(), DerivativeFilter< float, 7 >::reset(), and AP_Baro::update().

Here is the caller graph for this function:

Member Data Documentation

◆ _last_slope

template<class T, uint8_t FILTER_SIZE>
float DerivativeFilter< T, FILTER_SIZE >::_last_slope
private

Definition at line 46 of file DerivativeFilter.h.

◆ _new_data

template<class T, uint8_t FILTER_SIZE>
bool DerivativeFilter< T, FILTER_SIZE >::_new_data
private

Definition at line 45 of file DerivativeFilter.h.

◆ _timestamps

template<class T, uint8_t FILTER_SIZE>
uint32_t DerivativeFilter< T, FILTER_SIZE >::_timestamps[FILTER_SIZE]
private

Definition at line 50 of file DerivativeFilter.h.


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