[chronojump] Removed concentric-eccentric until fix it



commit 074c58fa2664e8d1b14e7cfbb6ca6edf9404837b
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Mar 5 11:23:20 2014 +0100

    Removed concentric-eccentric until fix it

 encoder/graph.R    |   14 +++++++++++---
 src/constants.cs   |    2 +-
 src/gui/encoder.cs |   25 ++++++++++++++++++-------
 3 files changed, 30 insertions(+), 11 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 90167a7..5c04022 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -352,6 +352,8 @@ fixRawdataInertial <- function(displacement) {
        #this is to make "inverted cumsum"
        displacement = c(0,diff(position))
 
+       print(displacement)
+
        return(displacement)
 }
 
@@ -432,7 +434,6 @@ findSmoothingsEC <- function(displacement, curves, eccon, smoothingOneC) {
 }
 
 #used in alls eccons
-#TODO: remember to change thi in python capture file because there it's only used in "c"
 reduceCurveBySpeed <- function(eccon, row, startT, displacement, smoothingOneEC, smoothingOneC) 
 {
        print("at reduceCurveBySpeed")
@@ -601,6 +602,8 @@ kinematicsF <- function(displacement, massBody, massExtra, exercisePercentBodyWe
        else
                smoothing = smoothingOneEC
 
+print(c(" smoothing:",smoothing))
+
        #x vector should contain at least 4 different values
        if(length(displacement) >= 4)
                speed <- getSpeed(displacement, smoothing)
@@ -611,7 +614,12 @@ kinematicsF <- function(displacement, massBody, massExtra, exercisePercentBodyWe
                accel <- getAcceleration(speed)
        else
                accel=list(y=rep(0,length(displacement)))
-       
+
+print(c(" ms",round(mean(speed$y),5)," ma",round(mean(accel$y),5)))
+print(c(" Ms",round(max(speed$y),5)," Ma",round(max(accel$y),5)))
+print(c(" |ms|",round(mean(abs(speed$y)),5)," |ma|:",round(mean(abs(accel$y)),5)))
+print(c(" |Ms|",round(max(abs(speed$y)),5)," |Ma|",round(max(abs(accel$y)),5)))
+
        #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 
        errorSearching = FALSE
@@ -1745,7 +1753,6 @@ getDisplacement <- function(encoderConfigurationName, data, diameter, diameterEx
        { 
                data = fixRawdataInertial(data)
        }
-
                
        return(data)
 }
@@ -2210,6 +2217,7 @@ doProcess <- function(options) {
        
                #find SmoothingsEC
                SmoothingsEC = findSmoothingsEC(displacement, curves, Eccon, SmoothingOneC)
+               print(c("SmoothingsEC:",SmoothingsEC))
                
                print("curves before reduceCurveBySpeed")
                print(curves)
diff --git a/src/constants.cs b/src/constants.cs
index 8aaa60b..b6498c3 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -633,7 +633,7 @@ public class Constants
 
        public static string Concentric = "Concentric";
        public static string EccentricConcentric = "Eccentric-concentric";
-       public static string ConcentricEccentric = "Concentric-eccentric";
+       //public static string ConcentricEccentric = "Concentric-eccentric";
 
        public enum EncoderCheckFileOp { ANALYZE_EXPORT_ALL_CURVES, ANALYZE_SAVE_IMAGE, ANALYZE_SAVE_TABLE}
 
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index a2c44c7..36e19ca 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -2549,19 +2549,21 @@ Log.WriteLine(str);
                        return massTotal - (currentPersonSession.Weight * percentBodyWeight / 100.0);
        }
 
-       //TODO: check all this  
        private string findEccon(bool forceEcconSeparated) {    
                if(Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_eccon),
                                        encoderEcconTranslation) == Constants.Concentric) 
                        return "c";
-               else if(Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_eccon),
-                                       encoderEcconTranslation) == Constants.EccentricConcentric) 
+               else //if(Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_eccon),
+               //                      encoderEcconTranslation) == Constants.EccentricConcentric) 
                {
                        if(forceEcconSeparated || ! check_encoder_analyze_eccon_together.Active)
                                return "ecS";
                        else 
                                return "ec";
                }
+               /*
+                * unavailable until find while concentric data on concentric is the same than in ecc-con,
+                * but is very different than in con-ecc
                else //Constants.ConcentricEccentric
                {
                        if(forceEcconSeparated || ! check_encoder_analyze_eccon_together.Active)
@@ -2569,6 +2571,7 @@ Log.WriteLine(str);
                        else 
                                return "ce";
                }
+               */
        }
        
        /* encoder exercise stuff */
@@ -2599,15 +2602,23 @@ Log.WriteLine(str);
                                Catalog.GetString(((EncoderExercise) encoderExercises[0]).name));
                combo_encoder_exercise.Changed += new EventHandler (on_combo_encoder_exercise_changed);
                
+               /* ConcentricEccentric
+                * unavailable until find while concentric data on concentric is the same than in ecc-con,
+                * but is very different than in con-ecc
+                */
                //create combo eccon
                string [] comboEcconOptions = { Constants.Concentric, 
-                       Constants.EccentricConcentric, Constants.ConcentricEccentric };
+                       Constants.EccentricConcentric//, 
+                       //Constants.ConcentricEccentric 
+               };
                string [] comboEcconOptionsTranslated = { 
                        Catalog.GetString(Constants.Concentric), 
-                       Catalog.GetString(Constants.EccentricConcentric), 
-                       Catalog.GetString(Constants.ConcentricEccentric) };
+                       Catalog.GetString(Constants.EccentricConcentric)//, 
+                       //Catalog.GetString(Constants.ConcentricEccentric) 
+               };
                encoderEcconTranslation = new String [comboEcconOptions.Length];
-               for(int j=0; j < 3 ; j++)
+               //for(int j=0; j < 3 ; j++)
+               for(int j=0; j < 2 ; j++)
                        encoderEcconTranslation[j] = comboEcconOptions[j] + ":" + 
comboEcconOptionsTranslated[j];
                combo_encoder_eccon = ComboBox.NewText ();
                UtilGtk.ComboUpdate(combo_encoder_eccon, comboEcconOptionsTranslated, "");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]