Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
low_pass_filter.hpp
Go to the documentation of this file.
1
#pragma once
2
#include "
filter.hpp
"
3
10
class
LowPassFilter
:
public
Filter
{
11
private
:
12
double
alpha_
;
13
double
prev_value_
;
14
public
:
21
LowPassFilter
(
double
alpha,
double
initial_value = 0.0);
22
29
double
filter
(
double
input)
override
;
30
36
void
reset
(
double
value = 0.0)
override
;
37
};
Filter
Abstract base class that defines the interface for single variable filters Derived classes must imple...
Definition
filter.hpp:8
LowPassFilter
Low Pass Filter class.
Definition
low_pass_filter.hpp:10
LowPassFilter::filter
double filter(double input) override
Apply the low pass filter to a new input.
Definition
low_pass_filter.cpp:6
LowPassFilter::prev_value_
double prev_value_
Previous filtered value.
Definition
low_pass_filter.hpp:13
LowPassFilter::alpha_
double alpha_
Smoothing factor.
Definition
low_pass_filter.hpp:12
LowPassFilter::reset
void reset(double value=0.0) override
Reset the filter to a specific value.
Definition
low_pass_filter.cpp:11
filter.hpp
src
common_lib
include
common_lib
filters
low_pass_filter.hpp
Generated by
1.9.8