[chronojump] fixed graphing accel/force in instantaneous analysis
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] fixed graphing accel/force in instantaneous analysis
- Date: Wed, 7 Dec 2016 17:16:23 +0000 (UTC)
commit b8a69c0e134334f923d5e3bfa8a44a49fd6b3b67
Author: Xavier Padullés <x padulles gmail com>
Date: Wed Dec 7 18:13:28 2016 +0100
fixed graphing accel/force in instantaneous analysis
encoder/graph.R | 4 ++--
encoder/util.R | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 808bec7..4b67aaa 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -2778,7 +2778,7 @@ doProcess <- function(options)
speed <- getSpeedSafe(displacementAllSet, smoothingAll)
accel <- getAccelerationSafe(speed)
#speed comes in mm/ms when derivate to accel its mm/ms^2 to convert it to m/s^2 need
to *1000 because it's quadratic
- accel$y <- accel$y * 1000
+ accel$y <- accel$y * 1000
dynamics <- getDynamics (op$EncoderConfigurationName,
speed$y, accel$y,
@@ -2836,7 +2836,7 @@ doProcess <- function(options)
par(new=T)
ylimHeight = max(abs(range(accel$y)))
ylim=c(- 1.05 * ylimHeight, 1.05 * ylimHeight) #put 0 in the middle, and
have 5% margin at each side
- plot(accel$y, col="magenta", ylim=ylim, type="l", xlab="",ylab="",axes=F)
+ plot(abs(accel$y), col="magenta", ylim=ylim, type="l", xlab="",ylab="",axes=F)
axis(4, col="magenta", lty=lty[1], line=axisLineRight, lwd=1, padj=-.5)
axisLineRight = axisLineRight +2
}
diff --git a/encoder/util.R b/encoder/util.R
index 0939ef4..e7ee258 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -921,7 +921,7 @@ getDynamicsInertial <- function(encoderConfigurationName, displacement, diameter
}
- force = forceDisc / gearedDown + forceBody
+ force = abs(forceDisc / gearedDown) + abs(forceBody)
power = powerDisc + powerBody
loopsMax = diameter.m * max(angle)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]