[chronojump] (cont)



commit ceae7b7e5cc7a8f61c1bab9902b5780136fab9aa
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Mar 4 15:28:40 2022 +0100

    (cont)

 src/forceSensorDynamics.cs | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/forceSensorDynamics.cs b/src/forceSensorDynamics.cs
index 9c954d03a..040c82f40 100644
--- a/src/forceSensorDynamics.cs
+++ b/src/forceSensorDynamics.cs
@@ -470,6 +470,10 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
                        return;
                }
 
+               //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 ++)
+                       force_l[i] = calculeForceWithCaptureOptions(force_l[i]);
+
                calculeResultant ();
                CalculedElasticPSAP = true;
        }
@@ -535,9 +539,8 @@ 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(calculeForceWithCaptureOptions(force_l[i]) / stiffness);
+                       position_not_smoothed_l.Add(force_l[i] / stiffness);
 
                position_l = smoothVariable(position_not_smoothed_l);
        }
@@ -598,8 +601,8 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
                        LogB.Information(string.Format("post force (but before applying captureoptions): 
{0}", force));
 
                        //force_l[i] = calculeForceWithCaptureOptions(force); //
-                       //2.2.1 this is applied now on position
-                       force_l[i] = force; //
+                       //2.2.1 this is applied now at constructor
+                       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]