[chronojump] ForceSensor minor adjustments on repetitions cut



commit 7b2a77c3e226ffb79cbcf2d4a1a5ce76e7c12cb0
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Feb 26 11:52:54 2020 +0100

    ForceSensor minor adjustments on repetitions cut

 src/forceSensor.cs          | 2 +-
 src/forceSensorDynamics.cs  | 2 +-
 src/gui/app1/forceSensor.cs | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 3a938f0a..8f21f97b 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -1567,7 +1567,7 @@ public class ForceSensorAnalyzeInstant
 
                //LogB.Information("times Length at B:", times.Count.ToString());
                if(CalculedElasticPSAP)
-                       times = times.GetRange(forceSensorDynamics.RemoveNValues -1, times.Count 
-2*forceSensorDynamics.RemoveNValues); // (index, count)
+                       times = times.GetRange(forceSensorDynamics.RemoveNValues +1, times.Count 
-2*forceSensorDynamics.RemoveNValues); // (index, count)
 
                //LogB.Information("times Length at C:", times.Count.ToString());
 
diff --git a/src/forceSensorDynamics.cs b/src/forceSensorDynamics.cs
index 56861a07..288fd9a8 100644
--- a/src/forceSensorDynamics.cs
+++ b/src/forceSensorDynamics.cs
@@ -556,7 +556,7 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
        private List<double> stripStartEnd(List<double> l)
        {
                LogB.Information(string.Format("removeN: {0}, l.Count: {1}", RemoveNValues, l.Count));
-               return l.GetRange(RemoveNValues -1, l.Count - 2*RemoveNValues);
+               return l.GetRange(RemoveNValues +1, l.Count - 2*RemoveNValues);
        }
 
        public override List<double> GetForces()
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 8e3e459a..a9fcb5af 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -1883,7 +1883,7 @@ LogB.Information(" fs R ");
                forces = fsd.GetForces();
                times.RemoveAt(0); //always (not-elastic and elastic) 1st has to be removed, because time is 
not ok there.
                if(fsd.CalculedElasticPSAP)
-                       times = times.GetRange(fsd.RemoveNValues -1, times.Count -2*fsd.RemoveNValues);
+                       times = times.GetRange(fsd.RemoveNValues +1, times.Count -2*fsd.RemoveNValues);
                int i = 0;
                foreach(int time in times)
                {


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