[chronojump] Fixed rotary inertial friction side: angle
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed rotary inertial friction side: angle
- Date: Mon, 31 Mar 2014 18:12:28 +0000 (UTC)
commit 24dc29da1ff71be3b9f5e56e017973c564dbdfcc
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Mar 31 20:11:36 2014 +0200
Fixed rotary inertial friction side: angle
encoder/graph.R | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index aa81125..1fdafc2 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -1879,18 +1879,9 @@ getDynamicsInertial <- function(encoderConfigurationName, displacement, d, D, ma
d.m = d / 100 #cm -> m
D.m = D / 100 #cm -> m
- if(encoderConfigurationName == "LINEARINERTIAL" ||
- encoderConfigurationName == "ROTARYFRICTIONAXISINERTIAL" ||
- encoderConfigurationName == "ROTARYAXISINERTIAL") #this has been converted to linear previously
- {
- angle = position.m * 2 / d.m
- angleSpeed = speed * 2 / d.m
- angleAccel = accel * 2 / d.m
- } else { # encoderConfigurationName == "ROTARYFRICTIONSIDEINERTIAL"
- angle = position.m * 2 / D.m
- angleSpeed = speed * 2 / D.m
- angleAccel = accel * 2 / D.m
- }
+ angle = position.m * 2 / d.m
+ angleSpeed = speed * 2 / d.m
+ angleAccel = accel * 2 / d.m
force = abs(inertiaMomentum * angleAccel) * (2 / d.m) + mass * (accel + g)
power = abs((inertiaMomentum * angleAccel) * angleSpeed) + mass * (accel + g) * speed
@@ -1912,6 +1903,8 @@ getDynamicsInertial <- function(encoderConfigurationName, displacement, d, D, ma
print(c("max power at inertial",max(abs(power))))
#print(c("powerBody",powerBody[1000]))
#print(c("powerWheel",powerWheel[1000]))
+ print(c("d.m, D.m", d.m, D.m))
+ print(c("max angle, max pos", max(angle), max(position.m)))
return(list(displacement=displacement, mass=mass, force=force, power=power))
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]