A method for analyzing an EKG signal in real time to produce a heart rate
indication. The most recent digitized samples of the EKG are stored in a
buffer and evaluated to identify each R-wave peak sample value that (a)
immediately precedes and is larger that the most recently stored digital
sample value, (b) is larger than any other sample value in the buffer,
and (c) differs from the first sample value in the buffer by more than a
predetermined threshold value. The threshold is a fraction of the rise
time slope of the last peak. The real time heart rate indication is
calculated from the time duration separating the last two detected peaks,
but rate indications outside the range of 30 200 beats per minute, and
which depart from the preceding rate indication by more than 50 percent,
are discarded.