Function rc_filter_first_order_highpass#
Defined in File filter.h
Function Documentation#
-
int rc_filter_first_order_highpass(rc_filter_t *f, double dt, double tc)#
Creates a first order high pass filter.
Any existing memory allocated for f is freed safely to avoid memory leaks and new memory is allocated for the new filter. dt is in units of seconds and time_constant is the number of seconds it takes to decay by 63.4% of a steady-state input. This can be used alongside rc_first_order_highpass to make a complementary filter pair.
- Parameters:
f – [out] Pointer to user’s rc_filter_t struct
dt – [in] desired timestep of discrete filter in seconds
tc – [in] time constant: Seconds it takes to decay by 63.4% of a steady-state input
- Returns:
Returns 0 on success or -1 on failure.