[chronojump] Fixed inertial signals (kinematicRanges, !reduceCurveBySpeed: it added descending value at right)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed inertial signals (kinematicRanges, !reduceCurveBySpeed: it added descending value at right)
- Date: Tue, 1 Apr 2014 10:35:53 +0000 (UTC)
commit 27aee83891f3f0344328023b7fe316e1b1d2277c
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Apr 1 12:33:57 2014 +0200
Fixed inertial signals (kinematicRanges, !reduceCurveBySpeed: it added descending value at right)
encoder/graph.R | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 2f957e4..aaf35dd 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -685,7 +685,7 @@ pafGenerate <- function(eccon, kinematics, massBody, massExtra) {
kinematicRanges <- function(singleFile, displacement, curves,
massBody, massExtra, exercisePercentBodyWeight,
-
encoderConfiguration,diameter,diameterExt,anglePush,angleWeight,inertiaMomentum,gearedDown,
+
encoderConfigurationName,diameter,diameterExt,anglePush,angleWeight,inertiaMomentum,gearedDown,
smoothingsEC, smoothingOneC, g, eccon, isPropulsive) {
n=length(curves[,1])
maxSpeedy=0; maxAccely=0; maxForce=0; maxPower=0
@@ -696,7 +696,7 @@ kinematicRanges <- function(singleFile, displacement, curves,
myExPercentBodyWeight = exercisePercentBodyWeight
#encoderConfiguration
- myEncoderConfigurationName = EncoderConfigurationName
+ myEncoderConfigurationName = encoderConfigurationName
myDiameter = diameter
myDiameterExt = diameterExt
myAnglePush = anglePush
@@ -718,6 +718,7 @@ kinematicRanges <- function(singleFile, displacement, curves,
myInertiaMomentum = curves[i,16]
myGearedDown = curves[i,17]
}
+
kn=kinematicsF(displacement[curves[i,1]:curves[i,2]],
myMassBody, myMassExtra, myExPercentBodyWeight,
myEncoderConfigurationName,myDiameter,myDiameterExt,myAnglePush,myAngleWeight,myInertiaMomentum,myGearedDown,
@@ -2264,19 +2265,26 @@ doProcess <- function(options) {
n=length(curves[,1])
quitIfNoData(n, curves, OutputData1)
+
+ print("curves before reduceCurveBySpeed")
+ print(curves)
- #reduceCurveBySpeed
- for(i in 1:n) {
- reduceTemp=reduceCurveBySpeed(Eccon, i, curves[i,1],
displacement[curves[i,1]:curves[i,2]], SmoothingOneC)
- curves[i,1] = reduceTemp[1]
- curves[i,2] = reduceTemp[2]
+ #reduceCurveBySpeed, don't do in inertial because it doesn't do a good right adjust on
changing phase
+ #what reduceCurveBySpeed is doing in inertial is adding a value at right, and this value is a
descending value
+ #and this produces a high acceleration there
+ if( ! isInertial(EncoderConfigurationName)) {
+ for(i in 1:n) {
+ reduceTemp=reduceCurveBySpeed(Eccon, i, curves[i,1],
displacement[curves[i,1]:curves[i,2]], SmoothingOneC)
+ curves[i,1] = reduceTemp[1]
+ curves[i,2] = reduceTemp[2]
+ }
}
#find SmoothingsEC
SmoothingsEC = findSmoothingsEC(displacement, curves, Eccon, SmoothingOneC)
print(c("SmoothingsEC:",SmoothingsEC))
- print("curves before reduceCurveBySpeed")
+ print("curves after reduceCurveBySpeed")
print(curves)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]