[chronojump] Curves at graph.R end at speed==0 cross before they ended at last ascending value
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Curves at graph.R end at speed==0 cross before they ended at last ascending value
- Date: Sat, 2 Nov 2013 00:02:04 +0000 (UTC)
commit 6d9f89ace0977fa776dc53cb72ffa5bac5bd7e9e
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Nov 1 22:29:44 2013 +0100
Curves at graph.R end at speed==0 cross
before they ended at last ascending value
encoder/graph.R | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 56bffd4..4ac3896 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -154,11 +154,11 @@ findCurves <- function(rawdata, eccon, min_height, draw, title) {
tempStart = mean(c(b$minindex[i,1],b$minindex[i,2]))
- #end at the mean of maximum values
- #tempEnd = mean(c(b$maxindex[j,1],b$maxindex[j,2]))
+ #end at the mean of maximum values then reduceCurveBySpeed will end it when first
speed==0 at right of maxspeed
+ tempEnd = mean(c(b$maxindex[j,1],b$maxindex[j,2]))
#end at the first maximum value
- tempEnd = b$maxindex[j,1]
+ #tempEnd = b$maxindex[j,1]
height=a[tempEnd]-a[tempStart]
if(height >= min_height) {
@@ -1786,10 +1786,6 @@ doProcess <- function(options) {
abline(v=c(curves[i,1],curves[i,2])/1000, lty=3, col="gray")
}
- #abline(v=c(820,2361,3255)/1000,col="green")
- #abline(v=c(1441,2731,3630)/1000,col="red")
-
-
#plot speed
par(new=T)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]