[chronojump] Force sensor fixed avg at ForceSensorCapturePoints (was divided by n-1)



commit 4708395bd1230c26f67bd312607012e6bcdc6068
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu May 30 15:51:02 2019 -0300

    Force sensor fixed avg at ForceSensorCapturePoints (was divided by n-1)

 src/forceSensor.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index a26f64b8..a83b67cc 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -216,7 +216,7 @@ public class ForceSensorCapturePoints
                                max = forces[i];
                }
 
-               avg = sum / (countB - countA);
+               avg = sum / ((countB - countA) +1);
        }
        public double GetRFD(int countA, int countB)
        {


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