kasturi rangan raghavan / Mbed 2 deprecated QRS

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers qrsdet-params.h Source File

qrsdet-params.h

00001 #ifndef ECG_THIRD_EPLIMITED_QRSDET_H_
00002 #define ECG_THIRD_EPLIMITED_QRSDET_H_
00003 // Modified by kasturir@ucla.edu (Kasturi Rangan Raghavan)
00004 /*****************************************************************************
00005 FILE:  qrsdet.h
00006 AUTHOR:    Patrick S. Hamilton
00007 REVISED:    4/16/2002
00008   ___________________________________________________________________________
00009 
00010 qrsdet.h QRS detector parameter definitions
00011 Copywrite (C) 2000 Patrick S. Hamilton
00012 
00013 This file is free software; you can redistribute it and/or modify it under
00014 the terms of the GNU Library General Public License as published by the Free
00015 Software Foundation; either version 2 of the License, or (at your option) any
00016 later version.
00017 
00018 This software is distributed in the hope that it will be useful, but WITHOUT ANY
00019 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
00020 PARTICULAR PURPOSE.  See the GNU Library General Public License for more
00021 details.
00022 
00023 You should have received a copy of the GNU Library General Public License along
00024 with this library; if not, write to the Free Software Foundation, Inc., 59
00025 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00026 
00027 You may contact the author by e-mail (pat@eplimited.com) or postal mail
00028 (Patrick Hamilton, E.P. Limited, 35 Medford St., Suite 204 Somerville,
00029 MA 02143 USA).  For updates to this software, please visit our website
00030 (http://www.eplimited.com).
00031   __________________________________________________________________________
00032   Revisions:
00033     4/16: Modified to allow simplified modification of digital filters in
00034        qrsfilt().
00035 *****************************************************************************/
00036 
00037 namespace qrsdet {
00038 static const int SAMPLE_RATE    = 125;    /* Sample rate in Hz. */
00039 static const double MS_PER_SAMPLE = 1000.0 / static_cast<double>(SAMPLE_RATE);
00040 
00041 static const int MS10 = 10.0/MS_PER_SAMPLE + 0.5;
00042 static const int MS25 = 25.0/MS_PER_SAMPLE + 0.5;
00043 static const int MS30 = 30.0/MS_PER_SAMPLE + 0.5;
00044 static const int MS80 = 80.0/MS_PER_SAMPLE + 0.5;
00045 static const int MS95 = 95.0/MS_PER_SAMPLE + 0.5;
00046 static const int MS100 = 100.0/MS_PER_SAMPLE + 0.5;
00047 static const int MS125    = 125.0/MS_PER_SAMPLE + 0.5;
00048 static const int MS150    = 150.0/MS_PER_SAMPLE + 0.5;
00049 static const int MS160    = 160.0/MS_PER_SAMPLE + 0.5;
00050 static const int MS175    = 175.0/MS_PER_SAMPLE + 0.5;
00051 static const int MS195    = 195.0/MS_PER_SAMPLE + 0.5;
00052 static const int MS200    = 200.0/MS_PER_SAMPLE + 0.5;
00053 static const int MS220    = 220.0/MS_PER_SAMPLE + 0.5;
00054 static const int MS250    = 250.0/MS_PER_SAMPLE + 0.5;
00055 static const int MS300    = 300.0/MS_PER_SAMPLE + 0.5;
00056 static const int MS360    = 360.0/MS_PER_SAMPLE + 0.5;
00057 static const int MS450    = 450.0/MS_PER_SAMPLE + 0.5;
00058 static const int MS1000 = SAMPLE_RATE;
00059 static const int MS1500 = 1500.0/MS_PER_SAMPLE;
00060 
00061 static const int DERIV_LENGTH = MS10;
00062 static const int LPBUFFER_LGTH = 2*MS25;
00063 static const int HPBUFFER_LGTH = MS125;
00064 static const int WINDOW_WIDTH = MS80; // moving window integration width.
00065 static const int PRE_BLANK = MS200;
00066 
00067 // Filter delays plus 200 ms blanking delay
00068 static const int FILTER_DELAY = DERIV_LENGTH / 2.0 + 
00069                          LPBUFFER_LGTH / 2.0 - 1.0 + 
00070                          (HPBUFFER_LGTH - 1.0) / 2.0 + 
00071                          PRE_BLANK;
00072 
00073 static const int DER_DELAY    = WINDOW_WIDTH + FILTER_DELAY + MS100;
00074 }  // end namespace qrsdet
00075 
00076 #endif  // ECG_THIRD_EPLIMITED_QRSDET_H_
00077