[chronojump] Encoder: fixed ecS graph problems
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder: fixed ecS graph problems
- Date: Mon, 4 Jun 2012 19:09:31 +0000 (UTC)
commit f05bd576e9c3138bc563e0bfe8290a4f8d7586f8
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jun 4 12:47:29 2012 +0200
Encoder: fixed ecS graph problems
encoder/graph.R | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 4bb50df..8ba0074 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -115,7 +115,9 @@ reduceCurveBySpeed <- function(eccon, row, startT, rawdata, smoothing) {
#from searchValue, go to the left, searchValue is at max speed on going up
#but is min speed on going down (this happens when not "concentric" and when phase is odd (impar)
searchValue = max(speed$y)
- if(eccon != "c" & row%%2 == 1)
+ if(eccon == "ec")
+ searchValue = min(speed$y)
+ else if(eccon == "ecS" & row%%2 == 1)
searchValue = min(speed$y)
maxSpeedT <- min(which(speed$y == searchValue))
@@ -542,10 +544,12 @@ if(length(args) < 3) {
smooth[(i+newLines)] = inputMultiData$smoothingOne[i]
dateTime[(i+newLines)] = as.vector(inputMultiData$dateTime[i])
- #myEccon[i+newLines] = as.vector(inputMultiData$eccon[i])
- if(processTimes == 2 & j == 1)
- myEccon[(i+newLines)] = "e"
- else {
+ if(processTimes == 2) {
+ if(j == 1)
+ myEccon[(i+newLines)] = "e"
+ else
+ myEccon[(i+newLines)] = "c"
+ } else {
if(inputMultiData$eccon[i] == "c")
myEccon[(i+newLines)] = "c"
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]