[chronojump] Fixed eccentric propulsive paint
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed eccentric propulsive paint
- Date: Sat, 2 Mar 2013 17:51:36 +0000 (UTC)
commit d6c3b57cb6792de86fbf54642da919d71b718a37
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Mar 2 18:50:55 2013 +0100
Fixed eccentric propulsive paint
encoder/graph.R | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index e5e13ad..2b7be5e 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -192,6 +192,8 @@ kinematicsF <- function(a, mass, smoothingOne, g, eccon, analysisOptions) {
accel$y <- accel$y * 1000
errorSearching = FALSE
+ eccentric = 0
+
#search propulsiveEnds
if(analysisOptions == "p") {
if(eccon=="c") {
@@ -229,7 +231,7 @@ kinematicsF <- function(a, mass, smoothingOne, g, eccon, analysisOptions) {
if(! errorSearching) {
#propulsive phase ends when accel is -9.8
if(length(which(accel$y[concentric]<=-g)) > 0 & analysisOptions == "p") {
- propulsiveEnds = min(which(accel$y[concentric]<=-g))
+ propulsiveEnds = max(eccentric) + min(which(accel$y[concentric]<=-g))
} else {
propulsiveEnds = max(concentric)
}
@@ -434,9 +436,9 @@ paint <- function(rawdata, eccon, xmin, xmax, yrange, knRanges, superpose, highl
if(draw) {
#propulsive phase ends when accel is -9.8
if(length(which(accel$y[concentric]<=-g)) > 0 & AnalysisOptions == "p") {
- propulsiveEnds = min(which(accel$y[concentric]<=-g))
+ propulsiveEnds = max(eccentric) + min(which(accel$y[concentric]<=-g))
} else {
- propulsiveEnds=max(concentric)
+ propulsiveEnds = max(concentric)
}
ylim=c(-max(abs(range(accel$y))),max(abs(range(accel$y)))) #put 0 in the middle
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]