Template for group 4

Dependencies:   mbed

Fork of RT2_P3_students by RT2_P3_students

Revision:
2:769ce5f06d3e
Parent:
1:a30512c3ac73
Child:
6:8ed679044a72
--- a/IIR_filter.h	Mon Apr 09 05:50:04 2018 +0000
+++ b/IIR_filter.h	Mon Apr 09 08:01:29 2018 +0000
@@ -1,31 +1,25 @@
-#ifndef IIR_FILTER_H_
-#define IIR_FILTER_H_
-
 class IIR_filter{
      public:
      
-        //IIR_filter(float *A[],float *B[]);       
-        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 *,float *, int,int);
+        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(u);
+            return filter((double)u);
          }
         virtual     ~IIR_filter();
         void        reset(float);
-        float       filter(float);
+        float       filter(double);
     
     private:
 
         unsigned int nb;
         unsigned int na;
-        float *B;
-        float *A;
-        float *uk;
-        float *yk;
-        float K;
-};
-
-#endif      // IIR_FILTER_H_
\ No newline at end of file
+        double *B;
+        double *A;
+        double *uk;
+        double *yk;
+        double K;
+};
\ No newline at end of file