[chronojump] Fixed crash in force calculation on LINEARONPLANE mode



commit 03ae36e952c4d7f08b32d64b74aee1b27be0497c
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Sep 23 15:50:49 2015 +0200

    Fixed crash in force calculation on LINEARONPLANE mode

 encoder/util.R |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/encoder/util.R b/encoder/util.R
index 87d4f35..5cc6b7f 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -702,7 +702,7 @@ getDynamicsNotInertial <- function(encoderConfigurationName, speed, accel,
   if(encoderConfigurationName == "LINEARONPLANEWEIGHTDIFFANGLE") {
     force <- massBody*(accel + g*sin(anglePush * pi / 180)) + massExtra*(g*sin(angleWeight * pi / 180) + 
accel)
   } else if(encoderConfigurationName == "LINEARONPLANE"){
-    force <- (massBody + massExtra)*(a + g*sin(anglePush * pi / 180))
+    force <- (massBody + massExtra)*(accel + g*sin(anglePush * pi / 180))
   } else {
        force <- massTotal*(accel+g)    #g:9.81 (used when movement is against gravity)
   }


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