[chronojump] Fixed force and power in inclinated planes
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed force and power in inclinated planes
- Date: Thu, 23 Apr 2015 13:50:00 +0000 (UTC)
commit 2b3399a4e7fee58af099d7a6d2d5435331471bb9
Author: Xavier Padullés <x padulles gmail com>
Date: Thu Apr 23 15:48:02 2015 +0200
Fixed force and power in inclinated planes
encoder/util.R | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/encoder/util.R b/encoder/util.R
index adc1df7..ed6639b 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -595,13 +595,7 @@ getDynamics <- function(encoderConfigurationName,
encoderConfigurationName == "WEIGHTEDMOVPULLEYROTARYAXIS" )
{
massExtra = getMass(massExtra, gearedDown, anglePush)
- } else if(encoderConfigurationName == "LINEARONPLANE") {
- massBody = getMass(massBody, gearedDown, anglePush)
- massExtra = getMass(massExtra, gearedDown, anglePush)
- } else if(encoderConfigurationName == "LINEARONPLANEWEIGHTDIFFANGLE") {
- massBody = getMass(massBody, gearedDown, anglePush)
- massExtra = getMass(massExtra, gearedDown, angleWeight)
- }
+ }
massTotal = massBody + massExtra
@@ -620,7 +614,9 @@ getDynamicsNotInertial <- function(encoderConfigurationName, speed, accel,
{
force = NULL
if(encoderConfigurationName == "LINEARONPLANEWEIGHTDIFFANGLE") {
- force <- massBody*accel + massBody*g*sin(anglePush) + massExtra*(g*sin(angleWeight) + accel)
+ 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))
} 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]