[chronojump] Improvements on 1RM detection
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Improvements on 1RM detection
- Date: Mon, 4 Mar 2013 20:10:42 +0000 (UTC)
commit ed6fe9352c903d070fef36d38cbd14d786c8a88e
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Mar 4 21:08:31 2013 +0100
Improvements on 1RM detection
encoder/graph.R | 26 ++++++++++++++++++++++----
src/gui/encoder.cs | 22 ++++++++++++++++++++--
2 files changed, 42 insertions(+), 6 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 0e5313a..08ee803 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -824,16 +824,24 @@ paint1RMBadillo2010 <- function (paf, title) {
loadPercentCalc=8.4326*curvesSpeed^2 - 73.501*curvesSpeed + 112.33
loadCalc= 100 * curvesLoad / loadPercentCalc
+ #for calculations take only the curves slower or == than 1.33
+ curvesSpeedInIntervalPos = which(curvesSpeed <= max(msp))
+
+ if(length(curvesSpeedInIntervalPos) == 0) {
+ plot(x=0,xlab="",ylab="",axes=F,type="n")
+ return()
+ }
+
par(mar=c(5,5,3,4))
plot(curvesLoad,curvesSpeed, type="p",
main=paste(title, "1RM prediction"),
sub="Adapted from Gonzalez-Badillo, Sanchez-Medina (2010)",
- xlim=c(min(curvesLoad),max(loadCalc)),
+ xlim=c(min(curvesLoad),max(loadCalc[curvesSpeedInIntervalPos])),
ylim=c(miny,maxy), xlab="", ylab="",axes=T)
mtext(side=1,line=2,"Kg")
- mtext(side=2,line=3,"Mean speed in propulsive phase (m/s)")
+ mtext(side=2,line=3,"Mean speed in concentric propulsive phase (m/s)")
mtext(side=4,line=2,"1RM (%)")
abline(h=msp, lty=2, col="gray")
@@ -1222,6 +1230,7 @@ doProcess <- function(options) {
writeCurves)
{
paf = data.frame()
+ j=1
for(i in 1:n) {
myMass = Mass
mySmoothingOne = SmoothingOne
@@ -1230,15 +1239,24 @@ doProcess <- function(options) {
myMass = curves[i,5]
mySmoothingOne = curves[i,6]
myEccon = curves[i,8]
+
+ #only use concentric data
+ if(Analysis == "1RMBadillo2010" & myEccon =="e")
+ next;
+ } else {
+ if(Analysis == "1RMBadillo2010" & Eccon == "ecS" & i%%2 == 1)
+ next;
}
+
print("i:")
print(i)
paf=rbind(paf,(powerBars(myEccon,
kinematicsF(rawdata[curves[i,1]:curves[i,2]],
myMass, mySmoothingOne, g, myEccon,
AnalysisOptions))))
+ #this is to solve the rows mismatch on 1RMBadillo2010 and myEccon="e"
+ rownames(paf)[j]=rownames(curves)[i]
+ j=j+1
}
- #print(paf)
- rownames(paf)=rownames(curves) #put correct rownames when there are inactive curves
print("----------------------------")
print(paf)
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index c989e68..3dea7d8 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1220,6 +1220,9 @@ public partial class ChronoJumpWindow
label_encoder_analyze_side_max.Visible = false;
+ //restore 1RM Prediction sensitiveness
+ radiobutton_encoder_analyze_max.Sensitive = true;
+
encoderButtonsSensitive(encoderSensEnumStored);
}
@@ -1235,7 +1238,10 @@ public partial class ChronoJumpWindow
check_encoder_analyze_eccon_together.Sensitive=false;
check_encoder_analyze_eccon_together.Active = true;
- encoderButtonsSensitive(encoderSensEnumStored);
+ //restore 1RM Prediction sensitiveness
+ radiobutton_encoder_analyze_max.Sensitive = true;
+
+ on_combo_encoder_analyze_cross_changed (obj, args);
}
*/
private void on_radiobutton_encoder_analyze_side_toggled (object obj, EventArgs args) {
@@ -1249,6 +1255,9 @@ public partial class ChronoJumpWindow
check_encoder_analyze_eccon_together.Sensitive=false;
check_encoder_analyze_eccon_together.Active = true;
+ //restore 1RM Prediction sensitiveness
+ radiobutton_encoder_analyze_max.Sensitive = true;
+
encoderButtonsSensitive(encoderSensEnumStored);
}
private void on_radiobutton_encoder_analyze_powerbars_toggled (object obj, EventArgs args) {
@@ -1262,6 +1271,9 @@ public partial class ChronoJumpWindow
label_encoder_analyze_side_max.Visible = false;
+ //restore 1RM Prediction sensitiveness
+ radiobutton_encoder_analyze_max.Sensitive = true;
+
encoderButtonsSensitive(encoderSensEnumStored);
}
@@ -1276,6 +1288,8 @@ public partial class ChronoJumpWindow
label_encoder_analyze_side_max.Visible = false;
+ on_combo_encoder_analyze_cross_changed (obj, args);
+
encoderButtonsSensitive(encoderSensEnumStored);
}
@@ -1429,8 +1443,12 @@ public partial class ChronoJumpWindow
encoderAnalyzeCrossTranslation) == "1RM Prediction") {
radiobutton_encoder_analyze_mean.Active = true;
radiobutton_encoder_analyze_max.Sensitive = false;
- } else
+ check_encoder_analyze_eccon_together.Active = false;
+ check_encoder_analyze_eccon_together.Sensitive = false;
+ } else {
radiobutton_encoder_analyze_max.Sensitive = true;
+ check_encoder_analyze_eccon_together.Sensitive = true;
+ }
}
void on_button_encoder_exercise_info_clicked (object o, EventArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]