[chronojump] Minor changes on forcePosition.R
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Minor changes on forcePosition.R
- Date: Fri, 22 Nov 2019 16:47:43 +0000 (UTC)
commit dc02b17a84c47cb0d9cd549320ab864a7b146e5a
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Nov 22 17:36:27 2019 +0100
Minor changes on forcePosition.R
r-scripts/forcePosition.R | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/r-scripts/forcePosition.R b/r-scripts/forcePosition.R
index 7db1c2bf..1616fdad 100644
--- a/r-scripts/forcePosition.R
+++ b/r-scripts/forcePosition.R
@@ -140,11 +140,12 @@ getRepetitions <- function(time, position, force, conMinDisplacement, eccMinDisp
if(position[currentSample] > position[possibleExtremeSample])
{
concentric = 1
- minDisplacement = eccMinDisplacement
+ minDisplacement = eccMinDisplacement #minDisplacement is referred to the next phase
} else {
concentric = -1
- minDisplacement = conMinDisplacement}
+ minDisplacement = conMinDisplacement
+ }
#print(paste("starting in mode:", concentric) )
@@ -177,7 +178,7 @@ getRepetitions <- function(time, position, force, conMinDisplacement, eccMinDisp
#Save the sample of the last extrme in order to compare new samples with it
lastExtremeSample = possibleExtremeSample
- #Changing the phase from concentric to eccentril or viceversa
+ #Changing the phase from concentric to eccentric or viceversa
concentric = -concentric
if (concentric == 1){
minDisplacement = eccMinDisplacement
@@ -201,11 +202,19 @@ getRepetitions <- function(time, position, force, conMinDisplacement, eccMinDisp
, meanSpeeds = meanSpeeds[2:length(meanSpeeds)]))
}
-testDir = "/home/xpadulles/Descargas/Piscina-mati/separat-per-punticoma/"
-allFiles = dir(testDir)
+testPadu <- function(conMinDisplacement = .5, eccMinDisplacement = .5)
+{
+ testDir = "/home/xpadulles/Descargas/Piscina-mati/separat-per-punticoma/"
+ allFiles = dir(testDir)
-for(i in 1:5)
+ for(i in 1:5)
+ {
+ dynamics = getDynamicsFromForceSensor(file = paste(testDir, allFiles[i], sep =""),
+ smooth = 10, totalMass = 0, stiffness = 71.93, angle =
0, conMinDisplacement, eccMinDisplacement)
+ }
+}
+testXavi <- function(conMinDisplacement = .5, eccMinDisplacement = .5)
{
- dynamics = getDynamicsFromForceSensor(file = paste(testDir, allFiles[i], sep ="")
- ,smooth = 10, totalMass = 0, stiffness = 71.93, angle = 0,
minDisplacement = .5)
+ dynamics = getDynamicsFromForceSensor(file =
"/home/xavier/.local/share/Chronojump/forceSensor/10/18_persona de 10 kg_2019-11-12_16-09-21.csv",
+ smooth = 10, totalMass = 0, stiffness = 71.93, angle = 0,
conMinDisplacement, eccMinDisplacement)
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]