[chronojump] Force sensor elastic fixed force without capture options



commit 3fd3e82c65549ee5db070553b4fcf8db6651ce96
Author: Xavier Padullés <x padulles gmail com>
Date:   Fri Jul 9 20:55:27 2021 +0200

    Force sensor elastic fixed force without capture options

 src/forceSensorDynamics.cs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/forceSensorDynamics.cs b/src/forceSensorDynamics.cs
index 16e925360..97fda26e1 100644
--- a/src/forceSensorDynamics.cs
+++ b/src/forceSensorDynamics.cs
@@ -583,11 +583,12 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
                        LogB.Information(string.Format("i pre: {0}, force_l[i]: {1}", i, force_l[i]));
                        //LogB.Information(string.Format("i: {0}, force_l[i]: {1}, force_l.Count: {2}", i, 
force_l[i], force_l.Count));
                        double force = Math.Sqrt(
-                                       Math.Pow(Math.Cos(fse.AngleDefault * Math.PI / 180.0) * (force_l[i] + 
totalMass * accel_l[i]), 2) +                  //Horizontal
-                                       Math.Pow(Math.Sin(fse.AngleDefault * Math.PI / 180.0) * (force_l[i] + 
totalMass * accel_l[i]) + totalMass * 9.81, 2) //Vertical
+                                       Math.Pow(Math.Cos(fse.AngleDefault * Math.PI / 180.0) * 
(Math.Abs(force_l[i]) + totalMass * accel_l[i]), 2) +                  //Horizontal
+                                       Math.Pow(Math.Sin(fse.AngleDefault * Math.PI / 180.0) * 
(Math.Abs(force_l[i]) + totalMass * accel_l[i]) + totalMass * 9.81, 2) //Vertical
                                        );
                        LogB.Information(string.Format("i post: {0}, force: {1}", i, force));
-                       force_l[i] = calculeForceWithCaptureOptions(force);
+                       //force_l[i] = calculeForceWithCaptureOptions(force); //Elastic is always resultant. 
Capture otions does not apply
+                       force_l[i] = force;
                }
        }
        


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