[chronojump] ForceSensor projected if abs or inverted, do it on the force coming from the sensor



commit a979437ffa8cb44029bdd2258c469c2a7ba1cd28
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Mar 4 15:02:51 2022 +0100

    ForceSensor projected if abs or inverted, do it on the force coming from the sensor

 src/forceSensor.cs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 30a75dde3..ff76abbc1 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -246,13 +246,18 @@ public class ForceSensor
                                );
         */
 
-        double forceResultant = forceRaw  +  totalMass*(accel + 9.81 * Math.Sin(fse.AngleDefault * Math.PI / 
180.0));
+               //on 2.2.1 ABS or inverted is not done on forceResultant,
+               //is done on force coming from the sensor
+               if(fsco != CaptureOptions.NORMAL)
+                       forceRaw = calculeForceWithCaptureOptions(forceRaw, fsco);
+
+               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));
 
-               return calculeForceWithCaptureOptions(forceResultant, fsco);
+               return forceResultant;
        }
        private static double calculeForceWithCaptureOptions(double force, CaptureOptions fsco)
        {


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