enhanced functionality in V01 vs. V00, V02 finished, conversion to double precsision in V03

Dependencies:   mbed

IIR_filter.h

Committer:
pmic
Date:
18 months ago
Revision:
22:c895fa4d7319
Parent:
18:44760408b75e

File content as of revision 22:c895fa4d7319:

class IIR_filter{
     public:
     
        IIR_filter(float T, float Ts);
        IIR_filter(float T, float Ts, float K);
        IIR_filter(float w0, float D, float Ts, float K);
        IIR_filter(float *b, float *a, int nb_, int na_);
                    
        float operator()(float u){
            return filter((double)u);
         }
        virtual     ~IIR_filter();
        void        reset(float);
        float       filter(double);
    
    private:

        unsigned int nb;
        unsigned int na;
        double *B;
        double *A;
        double *uk;
        double *yk;
        double K;
};