[chronojump] cont of last commit but done on forceSensorDynamics (not during capture)



commit 0e51e7affe752a266ec49f9dd22014f2f46bf261
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Mar 4 15:17:39 2022 +0100

    cont of last commit but done on forceSensorDynamics (not during capture)

 src/forceSensorDynamics.cs | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/forceSensorDynamics.cs b/src/forceSensorDynamics.cs
index 39358e502..9c954d03a 100644
--- a/src/forceSensorDynamics.cs
+++ b/src/forceSensorDynamics.cs
@@ -400,8 +400,13 @@ public class ForceSensorDynamicsNotElastic : ForceSensorDynamics
                                        Math.Pow(Math.Sin(fse.AngleDefault * Math.PI / 180.0) * 
(Math.Abs(force_l[i])) + totalMass * 9.81, 2) //Vertical
                                        );
                        */
+
+                       //on 2.2.1 ABS or inverted is not done on forceResultant,
+                       //is done on force coming from the sensor
+                       force_l[i] = calculeForceWithCaptureOptions(force_l[i]);
                        double force = force_l[i]  +  totalMass * 9.81 * Math.Sin(fse.AngleDefault * Math.PI 
/ 180.0);
-                       force_l[i] = calculeForceWithCaptureOptions(force);
+                       //force_l[i] = calculeForceWithCaptureOptions(force);
+                       force_l[i] = force;
                }
 
                calculeRepetitions(force_l);
@@ -530,8 +535,9 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
                
        private void calculePositions()
        {
+               //2.2.1 on resultant, ABS or INVERTED is done by data coming from the sensor
                for (int i = 0 ; i < force_l.Count; i ++)
-                       position_not_smoothed_l.Add(force_l[i] / stiffness);
+                       position_not_smoothed_l.Add(calculeForceWithCaptureOptions(force_l[i]) / stiffness);
 
                position_l = smoothVariable(position_not_smoothed_l);
        }
@@ -591,7 +597,9 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
 
                        LogB.Information(string.Format("post force (but before applying captureoptions): 
{0}", force));
 
-                       force_l[i] = calculeForceWithCaptureOptions(force); //
+                       //force_l[i] = calculeForceWithCaptureOptions(force); //
+                       //2.2.1 this is applied now on position
+                       force_l[i] = force; //
 
                        LogB.Information(string.Format("post force (after applying captureoptions): {0}", 
force_l[i]));
                }


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