2nd try

Dependents:   cuboid_balance

Committer:
altb2
Date:
Thu Feb 25 20:28:16 2021 +0000
Revision:
3:29602f4ade5c
Parent:
0:72b60c5271cc
Child:
2:8706bb4e8f93
First commit of Mirror actuato, still under construction, pins should be ok, next: check path planner;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb2 0:72b60c5271cc 1 class IIR_filter{
altb2 0:72b60c5271cc 2 public:
altb2 0:72b60c5271cc 3
altb2 0:72b60c5271cc 4 IIR_filter(float T, float Ts);
altb2 0:72b60c5271cc 5 IIR_filter(float T, float Ts, float K);
altb2 0:72b60c5271cc 6 IIR_filter(float w0, float D, float Ts, float K);
altb2 0:72b60c5271cc 7 IIR_filter(float *b, float *a, int nb_, int na_);
altb2 0:72b60c5271cc 8
altb2 0:72b60c5271cc 9 float operator()(float u){
altb2 0:72b60c5271cc 10 return filter((double)u);
altb2 0:72b60c5271cc 11 }
altb2 0:72b60c5271cc 12 virtual ~IIR_filter();
altb2 0:72b60c5271cc 13 void reset(float);
altb2 0:72b60c5271cc 14 float filter(double);
altb2 0:72b60c5271cc 15
altb2 0:72b60c5271cc 16 private:
altb2 0:72b60c5271cc 17
altb2 0:72b60c5271cc 18 unsigned int nb;
altb2 0:72b60c5271cc 19 unsigned int na;
altb2 0:72b60c5271cc 20 double *B;
altb2 0:72b60c5271cc 21 double *A;
altb2 0:72b60c5271cc 22 double *uk;
altb2 0:72b60c5271cc 23 double *yk;
altb2 0:72b60c5271cc 24 double K;
altb2 0:72b60c5271cc 25 };