Apollo 10.0
自动驾驶开放平台
|
The MeanFilter class is used to smoothen a series of noisy numbers, such as sensor data or the output of a function that we wish to be smoother. 更多...
#include <mean_filter.h>
Public 成员函数 | |
MeanFilter (const std::uint_fast8_t window_size) | |
Initializes a MeanFilter with a given window size. | |
MeanFilter ()=default | |
Default constructor; defers initialization. | |
~MeanFilter ()=default | |
Default destructor. | |
double | Update (const double measurement) |
Processes a new measurement in amortized constant time. | |
The MeanFilter class is used to smoothen a series of noisy numbers, such as sensor data or the output of a function that we wish to be smoother.
This is achieved by keeping track of the last k measurements (where k is the window size), and returning the average of all but the minimum and maximum measurements, which are likely to be outliers.
在文件 mean_filter.h 第 45 行定义.
|
explicit |
Initializes a MeanFilter with a given window size.
window_size | The window size of the MeanFilter. Older measurements are discarded. |
在文件 mean_filter.cc 第 32 行定义.
|
default |
Default constructor; defers initialization.
|
default |
Default destructor.
double apollo::common::MF::Update | ( | const double | measurement | ) |
Processes a new measurement in amortized constant time.
measurement | The measurement to be processed by the filter. |
在文件 mean_filter.cc 第 54 行定义.