An Adaptive RR Interval Detection Algorithm Based on Species Recognition