I've got some basic filter code setup (but not yet tested).
Dependencies: BLE_API Queue mbed nRF51822
Fork of BLE_HeartRate by
bdac.h@62:8e2fbe131b53, 2015-06-28 (annotated)
- Committer:
- roysandberg
- Date:
- Sun Jun 28 03:06:00 2015 +0000
- Revision:
- 62:8e2fbe131b53
Working Beat Detection and Analysis
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
roysandberg | 62:8e2fbe131b53 | 1 | /***************************************************************************** |
roysandberg | 62:8e2fbe131b53 | 2 | FILE: bdac.h |
roysandberg | 62:8e2fbe131b53 | 3 | AUTHOR: Patrick S. Hamilton |
roysandberg | 62:8e2fbe131b53 | 4 | REVISED: 9/25/2001 |
roysandberg | 62:8e2fbe131b53 | 5 | ___________________________________________________________________________ |
roysandberg | 62:8e2fbe131b53 | 6 | |
roysandberg | 62:8e2fbe131b53 | 7 | bdac.h: Beat detection and classification parameter definitions. |
roysandberg | 62:8e2fbe131b53 | 8 | Copywrite (C) 2001 Patrick S. Hamilton |
roysandberg | 62:8e2fbe131b53 | 9 | |
roysandberg | 62:8e2fbe131b53 | 10 | This file is free software; you can redistribute it and/or modify it under |
roysandberg | 62:8e2fbe131b53 | 11 | the terms of the GNU Library General Public License as published by the Free |
roysandberg | 62:8e2fbe131b53 | 12 | Software Foundation; either version 2 of the License, or (at your option) any |
roysandberg | 62:8e2fbe131b53 | 13 | later version. |
roysandberg | 62:8e2fbe131b53 | 14 | |
roysandberg | 62:8e2fbe131b53 | 15 | This software is distributed in the hope that it will be useful, but WITHOUT ANY |
roysandberg | 62:8e2fbe131b53 | 16 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
roysandberg | 62:8e2fbe131b53 | 17 | PARTICULAR PURPOSE. See the GNU Library General Public License for more |
roysandberg | 62:8e2fbe131b53 | 18 | details. |
roysandberg | 62:8e2fbe131b53 | 19 | |
roysandberg | 62:8e2fbe131b53 | 20 | You should have received a copy of the GNU Library General Public License along |
roysandberg | 62:8e2fbe131b53 | 21 | with this library; if not, write to the Free Software Foundation, Inc., 59 |
roysandberg | 62:8e2fbe131b53 | 22 | Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
roysandberg | 62:8e2fbe131b53 | 23 | |
roysandberg | 62:8e2fbe131b53 | 24 | You may contact the author by e-mail (pat@eplimited.edu) or postal mail |
roysandberg | 62:8e2fbe131b53 | 25 | (Patrick Hamilton, E.P. Limited, 35 Medford St., Suite 204 Somerville, |
roysandberg | 62:8e2fbe131b53 | 26 | MA 02143 USA). For updates to this software, please visit our website |
roysandberg | 62:8e2fbe131b53 | 27 | (http://www.eplimited.com). |
roysandberg | 62:8e2fbe131b53 | 28 | ******************************************************************************/ |
roysandberg | 62:8e2fbe131b53 | 29 | // was 100 |
roysandberg | 62:8e2fbe131b53 | 30 | #define BEAT_SAMPLE_RATE 125 |
roysandberg | 62:8e2fbe131b53 | 31 | |
roysandberg | 62:8e2fbe131b53 | 32 | #define BEAT_MS_PER_SAMPLE ( (double) 1000/ (double) BEAT_SAMPLE_RATE) |
roysandberg | 62:8e2fbe131b53 | 33 | |
roysandberg | 62:8e2fbe131b53 | 34 | #define BEAT_MS10 ((int) (10/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 35 | #define BEAT_MS20 ((int) (20/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 36 | #define BEAT_MS40 ((int) (40/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 37 | #define BEAT_MS50 ((int) (50/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 38 | #define BEAT_MS60 ((int) (60/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 39 | #define BEAT_MS70 ((int) (70/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 40 | #define BEAT_MS80 ((int) (80/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 41 | #define BEAT_MS90 ((int) (90/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 42 | #define BEAT_MS100 ((int) (100/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 43 | #define BEAT_MS110 ((int) (110/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 44 | #define BEAT_MS130 ((int) (130/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 45 | #define BEAT_MS140 ((int) (140/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 46 | #define BEAT_MS150 ((int) (150/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 47 | #define BEAT_MS250 ((int) (250/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 48 | #define BEAT_MS280 ((int) (280/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 49 | #define BEAT_MS300 ((int) (300/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 50 | #define BEAT_MS350 ((int) (350/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 51 | #define BEAT_MS400 ((int) (400/BEAT_MS_PER_SAMPLE + 0.5)) |
roysandberg | 62:8e2fbe131b53 | 52 | #define BEAT_MS1000 BEAT_SAMPLE_RATE |
roysandberg | 62:8e2fbe131b53 | 53 | |
roysandberg | 62:8e2fbe131b53 | 54 | #define BEATLGTH BEAT_MS1000 |
roysandberg | 62:8e2fbe131b53 | 55 | #define MAXTYPES 8 |
roysandberg | 62:8e2fbe131b53 | 56 | #define FIDMARK BEAT_MS400 |
roysandberg | 62:8e2fbe131b53 | 57 |