Running Fatigue Factor
by Nick Momrik
HTML
<p>
<input type="number" id="quarterTime" name="quarterTime" value="60" /> <label for="quarterTime">400m time <strong>in seconds</strong></label>
</p>
<p>
<input type="number" id="mileTime" name="mileTime" value="360" /> <label for="mileTime">Mile time <strong>in seconds</strong></label>
</p>
<p>
Fatigue Factor = <span id="fatigueFactor"></span>% <button onclick="updateFF()">
Update
</button>
</p>
<p>
For more information see <a href="http://aerobiccapacity.com/workouts/the-formula-for-a-better-run/">http://aerobiccapacity.com/workouts/the-formula-for-a-better-run/</a>.
</p>
JavaScript
$('#mileTime, #quarterTime').change( updateFF );
function updateFF() {
$('#fatigueFactor').text(Math.round(1000*(Math.log($('#mileTime').val() / $('#quarterTime').val()) / Math.log(4) - 1))/10);
}
updateFF();