[chronojump] Fixed ROTARYAXISINERTIALLATERALMOVPULLEY



commit 61f43d082ef55ccdb96403856266ad6e6a0a68ca
Author: Xavier Padullés <x padulles gmail com>
Date:   Thu Mar 2 19:02:16 2017 +0100

    Fixed ROTARYAXISINERTIALLATERALMOVPULLEY

 encoder/util.R |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/encoder/util.R b/encoder/util.R
index 7b03018..9c1b7b9 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -775,7 +775,8 @@ isInertial <- function(encoderConfigurationName) {
           encoderConfigurationName == "ROTARYFRICTIONAXISINERTIALMOVPULLEY" ||
           encoderConfigurationName == "ROTARYAXISINERTIAL" ||
           encoderConfigurationName == "ROTARYAXISINERTIALLATERAL" || 
-          encoderConfigurationName == "ROTARYAXISINERTIALMOVPULLEY"
+          encoderConfigurationName == "ROTARYAXISINERTIALMOVPULLEY" ||
+          encoderConfigurationName == "ROTARYAXISINERTIALLATERALMOVPULLEY"
           )
                return(TRUE)
        else
@@ -849,6 +850,8 @@ getDynamicsNotInertial <- function(encoderConfigurationName, speed, accel,
 #  ROTARYFRICTIONAXISINERTIAL Rotary friction encoder connected to inertial machine on the axis
 #  ROTARYAXISINERTIAL Rotary axis encoder  connected to inertial machine on the axis
 #  ROTARYAXISINERTIALMOVPULLEY Rotari axis encoder connected to inertial machine on the axis and the subject 
pulling from a moving pulley
+#  ROTARYAXISINERTIALLATERALMOVPULLEY Rotari axis encoder connected to inertial machine on the axis and the 
subject pulling from a moving pulley
+#       and performing and horizontal movement
 
 getDynamicsInertial <- function(encoderConfigurationName, displacement, diameter, mass, inertiaMomentum, 
gearedDown, smoothing)
 {
@@ -913,9 +916,9 @@ getDynamicsInertial <- function(encoderConfigurationName, displacement, diameter
               encoderConfigurationName == "ROTARYFRICTIONAXISINERTIALLATERAL" ||
               encoderConfigurationName == "ROTARYFRICTIONSIDEINERTIALLATERAL" ||
               encoderConfigurationName == "ROTARYAXISINERTIALLATERALMOVPULLEY"){
-    angle = position.m * 2 * gearedDown / diameter.m
-    angleSpeed = speed * 2 * gearedDown / diameter.m
-    angleAccel = accel * 2 * gearedDown / diameter.m
+    angle = position.m * 2 / gearedDown / diameter.m
+    angleSpeed = speed * 2 / gearedDown / diameter.m
+    angleAccel = accel * 2 / gearedDown / diameter.m
     anglePush = 0 #TODO: send from C#
     
     forceDisc = abs(inertiaMomentum * angleAccel) * (2 / diameter.m)
@@ -1008,7 +1011,6 @@ getDisplacementInertial <- function(displacement, encoderConfigurationName, diam
        } else if(encoderConfigurationName == "ROTARYFRICTIONSIDEINERTIAL" ||
                 encoderConfigurationName == "ROTARYFRICTIONSIDEINERTIALLATERAL" ||
                 encoderConfigurationName == "ROTARYFRICTIONSIDEINERTIALMOVPULLEY"){
-               
                displacement = displacement * diameter * gearedDown / diameterExt #displacement of the axis
                
        } else if(encoderConfigurationName == "ROTARYFRICTIONAXISINERTIALMOVPULLEY"){


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