5 template <
typename Coefficients>
11 float newhist = input + Coefficients::A1*
hist[1] + Coefficients::A2*
hist[0];
12 float ret = (newhist + 2*hist[1] + hist[0])/Coefficients::GAIN;
13 hist[0] = hist[1]; hist[1] = newhist;
Butter2< butter100_8_coeffs > butter50hz4_0
Butter2< butter100_025_coeffs > butter50hz0_125
Butter2< butter100_1_coeffs > butter50hz0_5
Butter2< butter100_2_coeffs > butter50hz1_0
Butter2< butter100_8_coeffs > butter10hz0_8
Butter2< butter100_3_coeffs > butter10hz0_3
Butter2< butter50_8_coeffs > butter50hz8_0
Butter2< butter100_3_coeffs > butter100hz3_0
Butter2< butter100_1_5_coeffs > butter100hz1_5
Butter2< butter100_1_coeffs > butter10hz0_1
Butter2< butter100_1_5_coeffs > butter50hz0_75
Butter2< butter100_8_coeffs > butter100hz8_0
Butter2< butter100_4_coeffs > butter100hz4_0
Butter2< butter100_3_coeffs > butter50hz1_5
Butter2< butter100_2_coeffs > butter100hz2_0
Butter2< butter100_05_coeffs > butter100hz0_5
Butter2< butter100_4_coeffs > butter50hz2_0
Butter2< butter100_025_coeffs > butter100hz0_25
Butter2< butter100_2_coeffs > butter10hz0_2
Butter2< butter100_1_5_coeffs > butter10hz0_15
Butter2< butter100_05_coeffs > butter50hz0_25
Butter2< butter100_1_coeffs > butter100hz1_0
Butter2< butter100_05_coeffs > butter10hz0_05
float filter(float input)
Butter2< butter100_025_coeffs > butter10hz0_025
Butter2< butter50_8_coeffs > butter10hz1_6
Butter2< butter100_4_coeffs > butter10hz0_4