[chronojump] Need Tests: cross vars 'ressitant torque' if diameter or gearedDown changes
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Need Tests: cross vars 'ressitant torque' if diameter or gearedDown changes
- Date: Fri, 18 Mar 2016 16:29:34 +0000 (UTC)
commit a93474d5d1f46f19b57d699549d443aab99dde58
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Mar 18 17:25:00 2016 +0100
Need Tests: cross vars 'ressitant torque' if diameter or gearedDown changes
encoder/graph.R | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 6742632..41dcc13 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -1492,7 +1492,9 @@ fitLine <- function(mode, x, y, col, lwd, lty) {
}
#option: mean or max
-paintCrossVariables <- function (paf, varX, varY, option, isAlone, title, singleFile, Eccon, ecconVector,
seriesName, do1RM, do1RMMethod, outputData1)
+paintCrossVariables <- function (paf, varX, varY, option, isAlone, title, singleFile, Eccon, ecconVector,
seriesName,
+ diameter, gearedDown,
+ do1RM, do1RMMethod, outputData1)
{
hasInertia <- FALSE
if(findInertialCurves(paf))
@@ -1514,10 +1516,18 @@ paintCrossVariables <- function (paf, varX, varY, option, isAlone, title, single
isPowerLoad = FALSE
if( (varX == "Load" || varX == "Inertia") && varY == "Power" )
isPowerLoad = TRUE
-
+
varXut = addUnitsAndTranslate(varX)
varYut = addUnitsAndTranslate(varY)
+
+ #if diameter or gearedDown changes in this data, the use resistant momentum
+ if(length(unique(diameter)) > 1 || length(unique(gearedDown)) > 1) {
+ x = x * gearedDown / diameter
+ varX = "Resistant torque"
+ varXut = "Resistant torque (Kg*cm)"
+ }
+
nums.print = NULL
#if only one series
@@ -2746,6 +2756,7 @@ doProcess <- function(options)
op$Eccon,
ecconVector,
mySeries,
+ repOp$diameter, repOp$gearedDown,
FALSE, FALSE, op$OutputData1)
par(new=T)
paintCrossVariables(paf, op$AnalysisVariables[2], analysisVertVars[2],
@@ -2754,6 +2765,7 @@ doProcess <- function(options)
op$Eccon,
ecconVector,
mySeries,
+ repOp$diameter, repOp$gearedDown,
FALSE, FALSE, op$OutputData1)
} else {
par(mar=c(5,4,5,2))
@@ -2763,6 +2775,7 @@ doProcess <- function(options)
op$Eccon,
ecconVector,
mySeries,
+ repOp$diameter, repOp$gearedDown,
FALSE, FALSE, op$OutputData1)
}
}
@@ -2779,6 +2792,7 @@ doProcess <- function(options)
op$Eccon,
ecconVector,
mySeries,
+ repOp$diameter, repOp$gearedDown,
op$AnalysisVariables[1], op$AnalysisVariables[2], #speed1RM,
method
op$OutputData1)
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]