[chronojump] ForceSensor export with Fmax (model)



commit ee866b5ab41f3cb5334ff7281690336b7003e0b9
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Feb 4 16:05:36 2021 +0100

    ForceSensor export with Fmax (model)

 r-scripts/maximumIsometricForce.R | 10 +++++-----
 src/forceSensor.cs                |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/r-scripts/maximumIsometricForce.R b/r-scripts/maximumIsometricForce.R
index 4114f120..8dcc718e 100644
--- a/r-scripts/maximumIsometricForce.R
+++ b/r-scripts/maximumIsometricForce.R
@@ -361,9 +361,6 @@ drawDynamicsFromLoadCell <- function(
              labels = paste("Impulse =", round(impulse, digits = 2), "N\u00B7s"), pos = 4, cex = 1.5)
         
         impulseLegend = paste("Impulse", impulseOptions$start, "-", impulseOptions$end, " = ", 
round(impulse, digits = 2), " N\u00B7s", sep = "") #\u00B7 is ยท
-
-#TODO: use it in the new dataframe
-#dfExport = c("impulse", impulseOptions$impulseFunction, impulseOptions$type, impulseOptions$start, 
impulseOptions$end, impulse)
     }
     
     #Plotting not analysed data
@@ -450,6 +447,8 @@ drawDynamicsFromLoadCell <- function(
     )
     legendColor = c("blue", "blue", "blue")
  
+    exportNames = paste("Fmax")
+    exportValues = dynamics$fmax.fitted
 
     #The coordinates where the lines and dots are plotted are calculated with the sampled data in raw and 
fitted data.
     #The slopes are calculated in that points
@@ -647,12 +646,13 @@ drawDynamicsFromLoadCell <- function(
 
            if(! is.null(RFD))
            {
-                   exportNames[n] = paste("RFD", RFDoptions$rfdFunction, RFDoptions$type, RFDoptions$start, 
RFDoptions$end, sep ="_")
-                   exportValues[n] = RFD
+                   exportNames = c(exportNames, paste("RFD", RFDoptions$rfdFunction, RFDoptions$type, 
RFDoptions$start, RFDoptions$end, sep ="_"))
+                   exportValues = c(exportValues, RFD)
            }
        }
 
     }
+
     exportNames = c(exportNames, paste("Impulse", impulseOptions$impulseFunction, impulseOptions$type, 
impulseOptions$start, impulseOptions$end, sep ="_"))
     exportValues = c(exportValues, impulse)
 
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 322dc395..7e64b8b1 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -2332,7 +2332,7 @@ public class ForceSensorExport
                                sep = ",";
 
                        //write header
-                       string [] headers = { "Person", "Datetime", "Exercise", "Repetition", "Laterality"};
+                       string [] headers = { "Person", "Datetime", "Exercise", "Repetition", "Laterality", 
"Fmax"};
                        int i = 0;
                        foreach(ForceSensorRFD rfd in rfdList)
                        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]