Heart Rate Recovery (HRR) Test
Assess your cardiovascular fitness in minutes.
How It Works
Heart Rate Recovery (HRR) measures how quickly your heart rate returns to normal after exercise. A faster recovery is a sign of good cardiovascular fitness.
- Warm-up: Start with a light 5-minute warm-up (e.g., walking).
- Exercise: You will exercise at a moderate to high intensity for 3 minutes (e.g., jogging, jumping jacks, cycling).
- Measure Peak HR: Immediately after the 3 minutes, measure your heart rate (beats per minute). This is your "Peak Heart Rate".
- Recover & Measure: Stop exercising, stand still, and wait for exactly 1 minute. Measure your heart rate again. This is your "Recovery Heart Rate".
Important: Consult a doctor before starting any new exercise program. Stop immediately if you feel dizzy, pained, or unwell.
3-Minute Exercise Timer
Begin your chosen exercise now.
3:00
Enter Your Heart Rate Values
Your Fitness Assessment
Your Heart Rate Recovery (HRR)
0
beats per minute
Fitness Level
N/A
This assessment is for informational purposes. Consult a healthcare professional for medical advice.
${interpretation}
`; tabs.results.disabled = false; setActiveTab('results'); } // --- PDF Generation --- async function generatePdf() { const { jsPDF } = window.jspdf; const doc = new jsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' }); const { peakHr, recoveryHr, hrr, level, interpretation } = assessmentData; // --- PDF Styling & Content --- const primaryColor = '#15803d'; // green-700 const textColor = '#1f2937'; doc.setFont('Inter', 'bold'); doc.setFontSize(22); doc.setTextColor(primaryColor); doc.text('Heart Rate Recovery (HRR) Report', 105, 25, { align: 'center' }); doc.setFont('Inter', 'normal'); doc.setFontSize(10); doc.setTextColor('#6b7280'); doc.text(`Assessed on: ${new Date().toLocaleDateString('en-US')}`, 105, 33, { align: 'center' }); doc.setLineWidth(0.5); doc.setDrawColor(primaryColor); doc.line(20, 40, 190, 40); let startY = 55; doc.setFont('Inter', 'bold'); doc.setFontSize(16); doc.setTextColor(textColor); doc.text('Your Test Data', 20, startY); startY += 10; const dataPoints = [ ['Peak Heart Rate:', `${peakHr} bpm`], ['Recovery Heart Rate:', `${recoveryHr} bpm`], ]; doc.setFontSize(11); dataPoints.forEach(([label, value]) => { doc.setFont('Inter', 'normal'); doc.text(label, 22, startY); doc.setFont('Inter', 'bold'); doc.text(value, 80, startY); startY += 8; }); startY += 10; doc.setFillColor(240, 253, 244); // green-50 doc.rect(15, startY - 10, 180, 40, 'F'); doc.setFont('Inter', 'bold'); doc.setFontSize(14); doc.setTextColor(textColor); doc.text('Heart Rate Recovery (HRR):', 45, startY); doc.text('Assessed Fitness Level:', 110, startY); doc.setFontSize(28); doc.setTextColor(primaryColor); doc.text(String(hrr), 55, startY + 12, { align: 'center' }); doc.text(level, 130, startY + 12, { align: 'center' }); startY += 45; doc.setFont('Inter', 'bold'); doc.setFontSize(16); doc.setTextColor(textColor); doc.text('Interpretation', 20, startY); startY += 8; doc.setFont('Inter', 'normal'); doc.setFontSize(11); doc.text(interpretation, 22, startY, { maxWidth: 165, lineHeightFactor: 1.5 }); startY = 265; doc.setLineWidth(0.2); doc.setDrawColor('#d1d5db'); doc.line(20, startY, 190, startY); startY += 8; doc.setFontSize(9); doc.setTextColor('#6b7280'); doc.text('This report is for informational purposes only. It is not a substitute for a comprehensive evaluation by a qualified healthcare provider.', 105, startY, { align: 'center', maxWidth: 170 }); doc.save('Heart_Rate_Recovery_Report.pdf'); } // --- Event Listeners --- if (nav.next) nav.next.addEventListener('click', () => navigate(1)); if (nav.prev) nav.prev.addEventListener('click', () => navigate(-1)); if (startTestBtn) startTestBtn.addEventListener('click', startTestTimer); if (calculateHrrBtn) calculateHrrBtn.addEventListener('click', calculateHrr); if (downloadPdfBtn) downloadPdfBtn.addEventListener('click', generatePdf); // Initial setup setActiveTab('instructions'); });