[chronojump] ForceSensor export added ForceMaxRaw
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor export added ForceMaxRaw
- Date: Tue, 16 Feb 2021 23:31:25 +0000 (UTC)
commit 0161c601625f61bc37ee60a345aa468b9e002d7f
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Feb 17 00:30:27 2021 +0100
ForceSensor export added ForceMaxRaw
r-scripts/maximumIsometricForce.R | 3 ++-
src/forceSensor.cs | 12 ++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/r-scripts/maximumIsometricForce.R b/r-scripts/maximumIsometricForce.R
index a9e51bce..79e4c820 100644
--- a/r-scripts/maximumIsometricForce.R
+++ b/r-scripts/maximumIsometricForce.R
@@ -1123,7 +1123,7 @@ start <- function(op)
exportModelVectorOnFail = c(exportModelVectorOnFail, NA) #impulse
#preparing header row (each set will have this in the result dataframe to be able to combine
them)
- exportNames = c("Name","Exercise","MaxAvgForceInWindow","Fmax")
+ exportNames = c("Name","Exercise","MaxForceRaw","MaxAvgForceInWindow","Fmax")
for(i in 1:length(op$drawRfdOptions))
{
RFDoptions = readRFDOptions(op$drawRfdOptions[i])
@@ -1170,6 +1170,7 @@ start <- function(op)
#mix strings and numbers directly in a data frame to not have numbers as text (and
then cannot export with decimal , or .)
exportSetDF = data.frame(dataFiles$title[i], dataFiles$exercise[i])
+ exportSetDF = cbind (exportSetDF, dataFiles$maxForceRaw[i])
exportSetDF = cbind (exportSetDF, dataFiles$maxAvgForceInWindow[i])
for(j in 1:length(exportModelVector))
exportSetDF = cbind (exportSetDF, exportModelVector[j])
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 2a5d0e8b..a9897045 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -1513,6 +1513,7 @@ public class ForceSensorGraphAB
//for export
public string fullURL;
public bool decimalIsPoint;
+ public double maxForceRaw;
public double maxAvgForceInWindow; //TODO: need to pass the window widht in seconds on graph.R
//for graph and for export
@@ -1546,15 +1547,16 @@ public class ForceSensorGraphAB
//constructor for export
public ForceSensorGraphAB (
- string fullURL, bool decimalIsPoint, double maxAvgForceInWindow,
+ string fullURL, bool decimalIsPoint, double maxForceRaw, double maxAvgForceInWindow,
ForceSensor.CaptureOptions fsco, int startSample, int endSample,
string title, string exercise, string datetime, TriggerList triggerList)
{
assignParams(fsco, startSample, endSample, title, exercise, datetime, triggerList);
- this.maxAvgForceInWindow = maxAvgForceInWindow;
this.fullURL = fullURL;
this.decimalIsPoint = decimalIsPoint;
+ this.maxForceRaw = maxForceRaw;
+ this.maxAvgForceInWindow = maxAvgForceInWindow;
}
public string ToCSVRowOnExport()
@@ -1570,6 +1572,7 @@ public class ForceSensorGraphAB
return fullURL + ";" +
decimalChar + ";" +
+ Util.ConvertToPoint(maxForceRaw) + ";" +
Util.ConvertToPoint(maxAvgForceInWindow) + ";" +
fsco.ToString() + ";" +
title + ";" +
@@ -1582,7 +1585,7 @@ public class ForceSensorGraphAB
public static string PrintCSVHeaderOnExport()
{
- return "fullURL;decimalChar;maxAvgForceInWindow;" +
+ return "fullURL;decimalChar;maxForceRaw;maxAvgForceInWindow;" +
"captureOptions;title;exercise;datetime;" +
"triggersON;triggersOFF;" + //unused on export
"startSample;endSample";
@@ -2687,7 +2690,8 @@ public class ForceSensorExport
fsgAB_l.Add(new ForceSensorGraphAB (
fs.FullURL,
Util.CSVDecimalColumnIsPoint(fs.FullURL, 1),
- maxAvgForceInWindow,
+ fsAI.ForceMAX, //raw
+ maxAvgForceInWindow, //raw
fs.CaptureOption,
repConcentricSampleStart, //start of
concentric rep
rep.sampleEnd, //end of
eccentric rep
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]