Difference between revisions of "Test"
From Fellrnr.com, Running tips
User:Fellrnr (User talk:Fellrnr | contribs) |
User:Fellrnr (User talk:Fellrnr | contribs) |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | + | function doCalc() | |
− | + | { | |
− | + | var trimps=new Array(); | |
− | + | var total = 0; | |
− | var | + | for(i=1; i< 8; i++) |
− | + | { | |
− | + | doTrimp('dur_'+i, 'cr10_'+i, 'trimp_'+i); | |
− | + | trimps[i-1] = Number(document.getElementById('trimp_'+i).innerHTML); | |
− | + | total += trimps[i-1]; | |
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | var average = getAverageFromNumArr(trimps, 2); | |
− | + | var stddev = getStandardDeviation(trimps, 2); | |
− | + | var Monotony = 10.0; | |
− | + | if (average < (10 * stddev)) | |
− | var | + | { |
− | + | Monotony = average / stddev; | |
− | + | Monotony = Math.round(Monotony*100)/100; | |
− | |||
− | |||
− | |||
} | } | ||
− | + | document.getElementById('Monotony').innerHTML = "Monotony: " + Monotony + " ( " + average + " / " + stddev + " )"; | |
− | + | document.getElementById('Total').innerHTML = "Total TRIMP: " + total; | |
− | + | document.getElementById('Stress').innerHTML = "Training Stress: " + Math.round(total * Monotony); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
</script> | </script> | ||
− | <form style="font-family: Helvetica,Arial,sans-serif;" id=" | + | <form style="font-family: Helvetica,Arial,sans-serif;border: solid 2px #40a0c0" id="MonotonyForm"> |
<table style="text-align: left;" border="1" cellpadding="1" cellspacing="1"> | <table style="text-align: left;" border="1" cellpadding="1" cellspacing="1"> | ||
<tr> | <tr> | ||
− | <th> | + | <th>Question</th> |
− | <th> | + | <th>strongly disagree</th> |
− | <th> | + | <th>disagree</th> |
− | <th> | + | <th>neutral</th> |
− | + | <th>agree</th> | |
− | + | <th>strongly agree</th> | |
− | |||
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td> | + | <td>I slept well last night</td> |
− | <td><input | + | <td><input type="radio" name="slept" value="1" /></td> |
− | <td><input | + | <td><input type="radio" name="slept" value="2" /></td> |
− | <td><input | + | <td><input type="radio" name="slept" value="3" /></td> |
+ | <td><input type="radio" name="slept" value="4" /></td> | ||
+ | <td><input type="radio" name="slept" value="5" /></td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | <label id=" | + | <label id="Total">Total:</label><br/> |
− | |||
− | |||
</form> | </form> | ||
</html> | </html> |
Revision as of 19:58, 6 March 2012