00001 00002 /* 00003 * This file is part of EKG/gEKG, a software package to record EKG. 00004 * Copyright © 2003 Lars Stollenwerk 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU General Public License as published by the 00008 * Free Software Foundation; either version 2 of the License, or (at your 00009 * option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License along 00017 * with this program; if not, write to the Free Software Foundation, Inc., 00018 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 #ifndef EKGLFILTER_H 00023 #define EKGLFILTER_H 00024 00025 #include <string> 00026 #include <cmath> 00027 #include "calibrate.h" 00028 #include "EKGfilter.h" 00029 using namespace std; 00030 00088 class EKGlfilter : public EKGfilter 00089 { 00090 public: 00094 EKGlfilter() 00095 { 00096 setLFreq( 10 ); 00097 La[0] = La[1] = La[2] = 0; 00098 LA[0] = LA[1] = LA[2] = 0; 00099 oldd[0] = oldd[1] = oldd[2] = 0; 00100 } 00106 float setLFreq( float x ); 00108 float getLFreq() { return sqrt( LL / EKG_TimeStep ) / 2 / M_PI; } 00128 virtual void input( float * d ); 00129 private: 00130 // ---------------------------------------------------------------------- 00131 // Tiefpaß 00132 // ---------------------------------------------------------------------- 00134 float LK; 00136 float LL; 00138 float La[3]; 00140 float LA[3]; 00142 float oldd[3]; 00144 static const int oversampling = 8; 00145 }; 00146 00147 #endif