[chronojump] After force sensor elastic capture done a recalculate to manage correctly body accel effect
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] After force sensor elastic capture done a recalculate to manage correctly body accel effect
- Date: Fri, 4 Mar 2022 17:03:37 +0000 (UTC)
commit 7bc6bf262aff72fee5ee14b99b3fc0f8d48c7d04
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Mar 4 17:58:08 2022 +0100
After force sensor elastic capture done a recalculate to manage correctly body accel effect
src/forceSensor.cs | 7 +++++--
src/gui/app1/forceSensor.cs | 3 +++
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index ff76abbc1..d49e5e4e3 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -211,7 +211,9 @@ public class ForceSensor
if(fse.PercentBodyWeight > 0 && personMass > 0)
totalMass = fse.PercentBodyWeight * personMass / 100.0;
- //right now only code for non-elastic
+ //TODO: right now only code for non-elastic
+ //so on elastic we do a load after capture
+ //in future show with cairo a graph of raw, and another with resultant and displacement
double accel = 0;
/*
@@ -231,6 +233,8 @@ public class ForceSensor
LogB.Information("forceRaw: " + forceRaw.ToString());
LogB.Information("totalMass: " + totalMass.ToString());
LogB.Information("AngleDefault: " + fse.AngleDefault.ToString());
+ */
+ /*
LogB.Information("horiz: " + (Math.Cos(fse.AngleDefault * Math.PI / 180.0) * (forceRaw +
totalMass * accel)).ToString());
LogB.Information("vertical: " + (Math.Sin(fse.AngleDefault * Math.PI / 180.0) * (forceRaw +
totalMass * accel) + totalMass * 9.81).ToString());
@@ -253,7 +257,6 @@ public class ForceSensor
double forceResultant = forceRaw + totalMass*(accel + 9.81 * Math.Sin(fse.AngleDefault *
Math.PI / 180.0));
-
//LogB.Information(string.Format("Abs(forceRaw): {0}, totalMass: {1}, forceResultant: {2}",
// Math.Abs(forceRaw), totalMass, forceResultant));
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index e9d71ef18..02488044b 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -1640,6 +1640,9 @@ LogB.Information(" fs C ");
configChronojump.ExhibitionStationType ==
ExhibitionTest.testTypes.FORCE_SHOT ) )
SqliteJson.UploadExhibitionTest(getExhibitionTestFromGui(configChronojump.ExhibitionStationType,
forceSensorValues.Max));
+ //on resultant (projected) recalculate at end (to manage correctly
speed and accel smoothed that affects body mass
+ if(currentForceSensorExercise.ComputeAsElastic)
+ force_sensor_recalculate();
}
} else if(forceProcessCancel || forceProcessError)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]